Class CmsTemplateServiceImpl
java.lang.Object
ch.tocco.nice2.optional.cms.impl.template.CmsTemplateServiceImpl
- All Implemented Interfaces:
CmsTemplateService
-
Constructor Summary
ConstructorsConstructorDescriptionCmsTemplateServiceImpl(org.slf4j.Logger log, Context context, QueryBuilderFactory queryBuilderFactory, CascadingDelete cascadingDelete, SecurityManager securityManager, L10N l10n, TextResources textResources, EntityDefaultValueService defaultValueService) -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateOrUpdate(CmsTemplate cmsTemplate) Update a template or create a new one, if it does not exist yet.voidDelete a template.findByType(String type) Get a list of all cms templates of a certain type.findByUniqueId(String uniqueId) Get the template with the given unique id.findEnabledByType(String type) Get a list of all cms templates of a certain type which are enabled.Get a list of all external cms templates.booleanMethod to determine if a template is in use.
-
Constructor Details
-
CmsTemplateServiceImpl
public CmsTemplateServiceImpl(org.slf4j.Logger log, Context context, QueryBuilderFactory queryBuilderFactory, CascadingDelete cascadingDelete, SecurityManager securityManager, L10N l10n, TextResources textResources, EntityDefaultValueService defaultValueService)
-
-
Method Details
-
createOrUpdate
Description copied from interface:CmsTemplateServiceUpdate a template or create a new one, if it does not exist yet. If there is a template with the same unique id but not of the same type, he method will return immediately and there will be no changes in the database.- Specified by:
createOrUpdatein interfaceCmsTemplateService- Parameters:
cmsTemplate- The template bean to store in the database.
-
delete
Description copied from interface:CmsTemplateServiceDelete a template.- Specified by:
deletein interfaceCmsTemplateService- Parameters:
uniqueId- The unique id of the template to delete.
-
isInUse
Description copied from interface:CmsTemplateServiceMethod to determine if a template is in use.- Specified by:
isInUsein interfaceCmsTemplateService- Parameters:
uniqueId- The unique id of the template to check.- Returns:
- true if the template is in use, else false.
-
findEnabledByType
Description copied from interface:CmsTemplateServiceGet a list of all cms templates of a certain type which are enabled.- Specified by:
findEnabledByTypein interfaceCmsTemplateService- Parameters:
type- The type to filter.- Returns:
- a list of all templates of the given type which are enabled.
-
findByType
Description copied from interface:CmsTemplateServiceGet a list of all cms templates of a certain type.- Specified by:
findByTypein interfaceCmsTemplateService- Parameters:
type- The type to filter.- Returns:
- a list of all templates of the given type.
-
findByUniqueId
Description copied from interface:CmsTemplateServiceGet the template with the given unique id.- Specified by:
findByUniqueIdin interfaceCmsTemplateService- Parameters:
uniqueId- The unique id of the template to return.- Returns:
- an
Optionalcontaining the template.
-
findExternal
Description copied from interface:CmsTemplateServiceGet a list of all external cms templates.- Specified by:
findExternalin interfaceCmsTemplateService- Returns:
- a list of all external cms templates.
-