Class ContentTypeServiceInternalImpl
- java.lang.Object
-
- org.craftercms.studio.impl.v2.service.content.internal.ContentTypeServiceInternalImpl
-
- All Implemented Interfaces:
ContentTypeServiceInternal
public class ContentTypeServiceInternalImpl extends Object implements ContentTypeServiceInternal
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfigurationService
configurationService
protected ContentService
contentService
protected String
contentTypeBasePathPattern
protected String
contentTypeDefinitionFilename
protected ContentTypeService
contentTypeService
protected String
controllerFormat
protected String
controllerPattern
protected ItemDAO
itemDao
protected SecurityService
securityService
protected SiteService
siteService
protected String
templateXPath
-
Constructor Summary
Constructors Constructor Description ContentTypeServiceInternalImpl(ContentTypeService contentTypeService, SecurityService securityService, ConfigurationService configurationService, ItemDAO itemDao, ContentService contentService, SiteService siteService, String contentTypeBasePathPattern, String contentTypeDefinitionFilename, String templateXPath, String controllerPattern, String controllerFormat)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deleteContentType(String siteId, String contentType, boolean deleteDependencies)
Deletes all files related to a given content-typeprotected String
getContentTypePath(String contentType)
ContentTypeUsage
getContentTypeUsage(String siteId, String contentType)
Finds all items related to a given content-typeList<QuickCreateItem>
getQuickCreatableContentTypes(String siteId)
Get list of content types marked as quick creatable for given site
-
-
-
Field Detail
-
contentTypeService
protected final ContentTypeService contentTypeService
-
securityService
protected final SecurityService securityService
-
configurationService
protected final ConfigurationService configurationService
-
itemDao
protected final ItemDAO itemDao
-
contentService
protected final ContentService contentService
-
siteService
protected final SiteService siteService
-
contentTypeBasePathPattern
protected final String contentTypeBasePathPattern
-
contentTypeDefinitionFilename
protected final String contentTypeDefinitionFilename
-
templateXPath
protected final String templateXPath
-
controllerPattern
protected final String controllerPattern
-
controllerFormat
protected final String controllerFormat
-
-
Constructor Detail
-
ContentTypeServiceInternalImpl
@ConstructorProperties({"contentTypeService","securityService","configurationService","itemDao","contentService","siteService","contentTypeBasePathPattern","contentTypeDefinitionFilename","templateXPath","controllerPattern","controllerFormat"}) public ContentTypeServiceInternalImpl(ContentTypeService contentTypeService, SecurityService securityService, ConfigurationService configurationService, ItemDAO itemDao, ContentService contentService, SiteService siteService, String contentTypeBasePathPattern, String contentTypeDefinitionFilename, String templateXPath, String controllerPattern, String controllerFormat)
-
-
Method Detail
-
getQuickCreatableContentTypes
public List<QuickCreateItem> getQuickCreatableContentTypes(String siteId)
Description copied from interface:ContentTypeServiceInternal
Get list of content types marked as quick creatable for given site- Specified by:
getQuickCreatableContentTypes
in interfaceContentTypeServiceInternal
- Parameters:
siteId
- site identifier- Returns:
- List of quick creatable content types
-
getContentTypeUsage
public ContentTypeUsage getContentTypeUsage(String siteId, String contentType) throws ServiceLayerException
Description copied from interface:ContentTypeServiceInternal
Finds all items related to a given content-type- Specified by:
getContentTypeUsage
in interfaceContentTypeServiceInternal
- 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
-
deleteContentType
public void deleteContentType(String siteId, String contentType, boolean deleteDependencies) throws ServiceLayerException, AuthenticationException, DeploymentException
Description copied from interface:ContentTypeServiceInternal
Deletes all files related to a given content-type- Specified by:
deleteContentType
in interfaceContentTypeServiceInternal
- 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 changes
-
-