Interface ContentTypeService
- All Known Implementing Classes:
ContentTypeServiceImpl
public interface ContentTypeService
Defines all operations related to content-types
- Since:
- 4.0
- Author:
- joseross
-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteContentType(String siteId, String contentType, boolean deleteDependencies) Deletes all files related to a given content-typegetAllModelDefinitions(String siteId) Get all content types for the given site.org.apache.commons.lang3.tuple.ImmutablePair<String, org.springframework.core.io.Resource> getContentTypePreviewImage(String siteId, String contentTypeId) Finds the preview image for a given content-typegetContentTypeUsage(String siteId, String contentType) Finds all items related to a given content-type
-
Method Details
-
getContentTypeUsage
ContentTypeUsage getContentTypeUsage(String siteId, String contentType) throws ServiceLayerException Finds all items related to a given content-type- Parameters:
siteId- the id of the sitecontentType- the id of the content-type- Returns:
- the usage
- Throws:
ServiceLayerException- if there is any error finding the items
-
getContentTypePreviewImage
org.apache.commons.lang3.tuple.ImmutablePair<String,org.springframework.core.io.Resource> getContentTypePreviewImage(String siteId, String contentTypeId) throws ServiceLayerException Finds the preview image for a given content-type- Parameters:
siteId- the id of the sitecontentTypeId- the id of the content-type- Returns:
- the preview image file as a pair of path and resource
- Throws:
ServiceLayerException- if there is any error finding the items
-
deleteContentType
void deleteContentType(String siteId, String contentType, boolean deleteDependencies) throws ServiceLayerException, AuthenticationException, DeploymentException, UserNotFoundException Deletes all files related to a given content-type- Parameters:
siteId- the id of the sitecontentType- the id of the content-typedeleteDependencies- indicates if all dependencies should be deleted- Throws:
ServiceLayerException- if there is any error deleting the filesAuthenticationException- if there is any error authenticating the userDeploymentException- if there is any error publishing the changesUserNotFoundException
-
getAllModelDefinitions
Get all content types for the given site.- Parameters:
siteId- the id of the site- Returns:
- a collection of content types including their config files (config.xml, form-definition.xml)
- Throws:
ServiceLayerException- if there is any error getting the content types
-