Class CmsCockpitServiceImpl
- java.lang.Object
-
- de.hybris.platform.cockpit.services.impl.AbstractServiceImpl
-
- de.hybris.platform.cmscockpit.services.impl.CmsCockpitServiceImpl
-
- All Implemented Interfaces:
CmsCockpitService
public class CmsCockpitServiceImpl extends AbstractServiceImpl implements CmsCockpitService
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.log4j.LoggerLOG-
Fields inherited from class de.hybris.platform.cockpit.services.impl.AbstractServiceImpl
modelService, typeService
-
Fields inherited from interface de.hybris.platform.cmscockpit.services.CmsCockpitService
ABSTRACTPAGE_UID_PREFIX, CMSITEM_UID
-
-
Constructor Summary
Constructors Constructor Description CmsCockpitServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ContentSlotModelcloneContentSlot(ContentSlotModel original)protected ContentSlotForPageModelcloneContentSlotForPageRelation(ContentSlotForPageModel original)protected voidcloneContentSlots(AbstractPageModel source, AbstractPageModel target)TypedObjectclonePageFirstLevel(TypedObject page, java.lang.String name)Creates a new page on base of an already existing page.java.lang.StringcreateRestrictionTooltip(TypedObject restriction)Retrieve the restriction description to be displayed in a tooltipCMSAdminSiteServicegetAdminSiteService()java.util.List<java.lang.String>getAllApprovalStatusCodes()Return all approval status codesjava.lang.StringgetApprovalStatusCode(TypedObject item)Find the approval status code for a given itemHybrisEnumValuegetApprovalStatusFromCode(java.lang.String code)java.lang.StringgetApprovalStatusName(java.lang.String code)Find an approval status name from a given codeCMSAdminContentSlotServicegetCMSAdminContentSlotService()protected CMSAdminPageServicegetCmsAdminPageService()TypedObjectgetDefaultPage(TypedObject originalPage)Find the default page for a given pageGenericRandomNameProducergetGenericRandomNameProducer()protected LocalizationServicegetLocalizationService()PermissionCheckingServicegetPermissionCheckingService()java.util.List<TypedObject>getPersonalizedPages(TypedObject page)Find all personalized pages for a given pagejava.util.List<TypedObject>getPersonalizedPages(TypedObject page, TypedObject excludePage)Find all personalized pages for a given page without a given excluded pagejava.util.List<AbstractPageModel>getRecentlyEditedPages(int count)Find all pages recently editedprotected ScriptEvaluationServicegetScriptEvaluationService()java.util.Collection<CMSSiteModel>getSites()Find all sitesSystemServicegetSystemService()UserServicegetUserService()java.util.Collection<CMSSiteModel>getWebsites()Find all sitesbooleanisPartOfTemplate(TypedObject cmsComponent)Determine whether a component is part of a templatebooleanisRestricted(TypedObject cmsComponent)Determine whether a component has any associated restrictions or notvoidsetApprovalStatus(TypedObject typedObject, java.lang.String code)Update an approval status for a given codevoidsetCmsAdminPageService(CMSAdminPageService cmsAdminPageService)voidsetGenericRandomNameProducer(GenericRandomNameProducer genericRandomNameProducer)voidsetLocalizationService(LocalizationService localizationService)voidsetPermissionCheckingService(PermissionCheckingService permissionCheckingService)voidsetScriptEvaluationService(ScriptEvaluationService scriptEvaluationService)voidsetSystemService(SystemService systemService)voidsetUserService(UserService userService)-
Methods inherited from class de.hybris.platform.cockpit.services.impl.AbstractServiceImpl
getEnum, getEnums, getLocalizedLabel, getLocalizedLabel, getModelService, getTypeService, setCockpitTypeService, setLabelResolver, setModelService
-
-
-
-
Method Detail
-
getAllApprovalStatusCodes
public java.util.List<java.lang.String> getAllApprovalStatusCodes()
Description copied from interface:CmsCockpitServiceReturn all approval status codes- Specified by:
getAllApprovalStatusCodesin interfaceCmsCockpitService- Returns:
- all approval status codes
-
getApprovalStatusName
public java.lang.String getApprovalStatusName(java.lang.String code)
Description copied from interface:CmsCockpitServiceFind an approval status name from a given code- Specified by:
getApprovalStatusNamein interfaceCmsCockpitService- Parameters:
code- of approval status- Returns:
- the approval status name
-
getApprovalStatusFromCode
public HybrisEnumValue getApprovalStatusFromCode(java.lang.String code)
-
setApprovalStatus
public void setApprovalStatus(TypedObject typedObject, java.lang.String code)
Description copied from interface:CmsCockpitServiceUpdate an approval status for a given code- Specified by:
setApprovalStatusin interfaceCmsCockpitService- Parameters:
typedObject- requiring an approvalcode- of approval status to be updated
-
getApprovalStatusCode
public java.lang.String getApprovalStatusCode(TypedObject item)
Description copied from interface:CmsCockpitServiceFind the approval status code for a given item- Specified by:
getApprovalStatusCodein interfaceCmsCockpitService- Parameters:
item- having an approval status- Returns:
- approval status code
-
isPartOfTemplate
public boolean isPartOfTemplate(TypedObject cmsComponent)
Description copied from interface:CmsCockpitServiceDetermine whether a component is part of a template- Specified by:
isPartOfTemplatein interfaceCmsCockpitService- Parameters:
cmsComponent- to be determined if it is contained in a template- Returns:
trueif a component is part of a template;falseotherwise
-
isRestricted
public boolean isRestricted(TypedObject cmsComponent)
Description copied from interface:CmsCockpitServiceDetermine whether a component has any associated restrictions or not- Specified by:
isRestrictedin interfaceCmsCockpitService- Parameters:
cmsComponent- to be determined if it has any restrictions- Returns:
trueif a component has at least one restriction;falseotherwise
-
clonePageFirstLevel
public TypedObject clonePageFirstLevel(TypedObject page, java.lang.String name)
Description copied from interface:CmsCockpitServiceCreates a new page on base of an already existing page. Also creates new content slots for this page, but components are the same as in the original page.- Specified by:
clonePageFirstLevelin interfaceCmsCockpitService- Parameters:
page- the page to use as templatename- the name for the new page, if null the name of the original page is used- Returns:
- the new page
-
cloneContentSlots
protected void cloneContentSlots(AbstractPageModel source, AbstractPageModel target)
-
cloneContentSlotForPageRelation
protected ContentSlotForPageModel cloneContentSlotForPageRelation(ContentSlotForPageModel original)
-
cloneContentSlot
protected ContentSlotModel cloneContentSlot(ContentSlotModel original)
-
createRestrictionTooltip
public java.lang.String createRestrictionTooltip(TypedObject restriction)
Description copied from interface:CmsCockpitServiceRetrieve the restriction description to be displayed in a tooltip- Specified by:
createRestrictionTooltipin interfaceCmsCockpitService- Parameters:
restriction- containing the description to be displayed- Returns:
- the description of a given restriction
-
getCMSAdminContentSlotService
public CMSAdminContentSlotService getCMSAdminContentSlotService()
-
getGenericRandomNameProducer
public GenericRandomNameProducer getGenericRandomNameProducer()
-
getAdminSiteService
public CMSAdminSiteService getAdminSiteService()
-
getWebsites
public java.util.Collection<CMSSiteModel> getWebsites()
Description copied from interface:CmsCockpitServiceFind all sites- Specified by:
getWebsitesin interfaceCmsCockpitService- Returns:
- collection of sites, user type permission is checked before returning
-
getRecentlyEditedPages
public java.util.List<AbstractPageModel> getRecentlyEditedPages(int count)
Description copied from interface:CmsCockpitServiceFind all pages recently edited- Specified by:
getRecentlyEditedPagesin interfaceCmsCockpitService- Parameters:
count- max number of pages to be returned- Returns:
- all pages recently edited
-
setGenericRandomNameProducer
public void setGenericRandomNameProducer(GenericRandomNameProducer genericRandomNameProducer)
-
getSystemService
public SystemService getSystemService()
-
setSystemService
public void setSystemService(SystemService systemService)
-
setLocalizationService
public void setLocalizationService(LocalizationService localizationService)
-
getLocalizationService
protected LocalizationService getLocalizationService()
-
getPersonalizedPages
public java.util.List<TypedObject> getPersonalizedPages(TypedObject page)
Description copied from interface:CmsCockpitServiceFind all personalized pages for a given page- Specified by:
getPersonalizedPagesin interfaceCmsCockpitService- Parameters:
page- which is personalized- Returns:
- all personalized pages for a given page
-
getPersonalizedPages
public java.util.List<TypedObject> getPersonalizedPages(TypedObject page, TypedObject excludePage)
Description copied from interface:CmsCockpitServiceFind all personalized pages for a given page without a given excluded page- Specified by:
getPersonalizedPagesin interfaceCmsCockpitService- Parameters:
page- which is personalizedexcludePage- which is excluded- Returns:
- all personalized pages for a given page
-
getDefaultPage
public TypedObject getDefaultPage(TypedObject originalPage)
Description copied from interface:CmsCockpitServiceFind the default page for a given page- Specified by:
getDefaultPagein interfaceCmsCockpitService- Parameters:
originalPage- having a default page- Returns:
- a default page for a given page
-
setCmsAdminPageService
public void setCmsAdminPageService(CMSAdminPageService cmsAdminPageService)
-
getCmsAdminPageService
protected CMSAdminPageService getCmsAdminPageService()
-
getSites
public java.util.Collection<CMSSiteModel> getSites()
Description copied from interface:CmsCockpitServiceFind all sites- Specified by:
getSitesin interfaceCmsCockpitService- Returns:
- collection of sites, user type permission is checked before returning
-
getPermissionCheckingService
public PermissionCheckingService getPermissionCheckingService()
- Returns:
- the permissionCheckingService
-
setPermissionCheckingService
public void setPermissionCheckingService(PermissionCheckingService permissionCheckingService)
- Parameters:
permissionCheckingService- the permissionCheckingService to set
-
getUserService
public UserService getUserService()
- Returns:
- the userService
-
setUserService
public void setUserService(UserService userService)
- Parameters:
userService- the userService to set
-
setScriptEvaluationService
public void setScriptEvaluationService(ScriptEvaluationService scriptEvaluationService)
-
getScriptEvaluationService
protected ScriptEvaluationService getScriptEvaluationService()
-
-