Class DefaultCMSComponentService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
de.hybris.platform.cms2.servicelayer.services.impl.AbstractCMSService
de.hybris.platform.cms2.servicelayer.services.impl.DefaultCMSComponentService
- All Implemented Interfaces:
CMSComponentService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
Default implementation of
CMSComponentService interface.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO -
Field Summary
FieldsFields inherited from class de.hybris.platform.cms2.servicelayer.services.impl.AbstractCMSService
CURRENTCATALOGVERSION, CURRENTSITEFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
sessionService, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
ConstructorsConstructorDescriptionConstructor used to create new instance ofDefaultCMSComponentService -
Method Summary
Modifier and TypeMethodDescription<T extends AbstractCMSComponentModel>
TGets the abstract cms component.<T extends AbstractCMSComponentModel>
TgetAbstractCMSComponent(String id, String contentSlotId, Collection<CatalogVersionModel> catalogVersions) Gets the abstract cms component.<T extends AbstractCMSComponentModel>
TgetAbstractCMSComponent(String id, Collection<CatalogVersionModel> catalogVersions) Gets the abstract cms component.<T extends AbstractCMSComponentModel>
SearchPageData<T>getAbstractCMSComponents(Collection<String> ids, SearchPageData searchPageData) Gets the abstract cms component.<T extends AbstractCMSComponentModel>
SearchPageData<T>getAllAbstractCMSComponents(SearchPageData searchPageData) Gets all abstract cms components filtered by the specified pagination and sorting information.getAllChildren(AbstractCMSComponentModel cmsComponentModel) Get a CMSComponent's all children and children's children.getAllParents(AbstractCMSComponentModel cmsComponentModel) Get a CMSComponent's parent components and parents' parents.protected CatalogVersionServiceprotected CMSComponentDaoprotected CMSContentSlotServicegetEditorProperties(AbstractCMSComponentModel component) Get all editor properties for the given content element.protected Collection<String>getEditorProperties(AbstractCMSComponentModel component, boolean readableOnly) protected ModelServiceGet all readable editor properties for the given content element.<T extends SimpleCMSComponentModel>
TGets the simple cms component.getSystemProperties(AbstractCMSComponentModel component) Get all system properties for the given content element.protected TypeServicebooleaninSharedSlots(AbstractCMSComponentModel componentModel) Check if a component is in shared slot or not.booleanisComponentContainer(String componentTypeCode) Checks if component is a container.booleanisComponentRestricted(AbstractCMSComponentModel component) Checks if passed as parameterAbstractCMSComponentModelis restricted restricted.booleanisComponentUsedOutsidePage(AbstractCMSComponentModel component, AbstractPageModel page) Checks if the component is used outside the page provided as reference.voidsetCatalogVersionService(CatalogVersionService catalogVersionService) voidsetCmsComponentDao(CMSComponentDao cmsComponentDao) voidsetCmsContentSlotService(CMSContentSlotService cmsContentSlotService) voidsetModelService(ModelService modelService) voidsetSystemProperties(List<String> systemProperties) voidsetTypeService(TypeService typeService) Methods inherited from class de.hybris.platform.cms2.servicelayer.services.impl.AbstractCMSService
getBaseSiteService, getCurrentCatalogVersion, getCurrentSite, getSearchRestrictionService, getUserService, setBaseSiteService, setSearchRestrictionService, setUserServiceMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getSessionService, getTxManager, setSessionService, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Field Details
-
CE_SYSTEM_PROPS
- See Also:
-
-
Constructor Details
-
DefaultCMSComponentService
public DefaultCMSComponentService()Constructor used to create new instance ofDefaultCMSComponentService
-
-
Method Details
-
getAbstractCMSComponent
public <T extends AbstractCMSComponentModel> T getAbstractCMSComponent(String id) throws CMSItemNotFoundException Gets the abstract cms component.- Specified by:
getAbstractCMSComponentin interfaceCMSComponentService- Type Parameters:
T- the generic type- Parameters:
id- the id of cms component to get- Returns:
- the abstract cms component
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getAbstractCMSComponents
public <T extends AbstractCMSComponentModel> SearchPageData<T> getAbstractCMSComponents(Collection<String> ids, SearchPageData searchPageData) Gets the abstract cms component.- Specified by:
getAbstractCMSComponentsin interfaceCMSComponentService- Type Parameters:
T- the AbstractCMSComponentModel subclass type- Parameters:
ids- the id collection of cms components to getsearchPageData- the searchPageData contains requested pagination and sorting information- Returns:
- the list of abstract cms component in SearchPageData; otherwise return an empty collection result when no component is found
-
getAllAbstractCMSComponents
public <T extends AbstractCMSComponentModel> SearchPageData<T> getAllAbstractCMSComponents(SearchPageData searchPageData) Description copied from interface:CMSComponentServiceGets all abstract cms components filtered by the specified pagination and sorting information.- Specified by:
getAllAbstractCMSComponentsin interfaceCMSComponentService- Type Parameters:
T- the AbstractCMSComponentModel subclass type- Parameters:
searchPageData- the searchPageData contains requested pagination and sorting information- Returns:
- the list of abstract cms component in SearchPageData; otherwise return an empty collection result when no component is found
-
getAbstractCMSComponent
public <T extends AbstractCMSComponentModel> T getAbstractCMSComponent(String id, Collection<CatalogVersionModel> catalogVersions) throws CMSItemNotFoundException Gets the abstract cms component.- Specified by:
getAbstractCMSComponentin interfaceCMSComponentService- Type Parameters:
T- the generic type- Parameters:
id- the id of cms component to getcatalogVersions- the catalog versions- Returns:
- the abstract cms component
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getAbstractCMSComponent
public <T extends AbstractCMSComponentModel> T getAbstractCMSComponent(String id, String contentSlotId, Collection<CatalogVersionModel> catalogVersions) throws CMSItemNotFoundException Gets the abstract cms component.- Specified by:
getAbstractCMSComponentin interfaceCMSComponentService- Type Parameters:
T- the generic type- Parameters:
id- the id of cms component to getcontentSlotId- the content slot idcatalogVersions- the catalog versions- Returns:
- the abstract cms component
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getEditorProperties
Get all editor properties for the given content element. Editor-Properties are editorial properties, like headline, image and so on. Editor-Properties are used to display information on the frontend.- Specified by:
getEditorPropertiesin interfaceCMSComponentService- Parameters:
component- the component which editor properties should be retrieved- Returns:
- all editor properties
-
getReadableEditorProperties
Get all readable editor properties for the given content element. SeeCMSComponentService.getEditorProperties(AbstractCMSComponentModel)for retrieving all editor properties.- Specified by:
getReadableEditorPropertiesin interfaceCMSComponentService- Parameters:
component- the component which editor properties should be retrieved- Returns:
- readable editor properties
-
getEditorProperties
protected Collection<String> getEditorProperties(AbstractCMSComponentModel component, boolean readableOnly) -
getSimpleCMSComponent
public <T extends SimpleCMSComponentModel> T getSimpleCMSComponent(String id) throws CMSItemNotFoundException Gets the simple cms component.- Specified by:
getSimpleCMSComponentin interfaceCMSComponentService- Type Parameters:
T- the generic type- Parameters:
id- the id of component to get- Returns:
- the simple cms component
- Throws:
CMSItemNotFoundException- thrown when item was not found
-
getSystemProperties
Get all system properties for the given content element. System-Properties are non editorial properties, like id, catalogVersion and so on. System-Properties are not used to display any information on the frontend.- Specified by:
getSystemPropertiesin interfaceCMSComponentService- Parameters:
component- the component which system properties should be retrieved- Returns:
- collection of all system properties for component
-
isComponentContainer
Description copied from interface:CMSComponentServiceChecks if component is a container.- Specified by:
isComponentContainerin interfaceCMSComponentService- Parameters:
componentTypeCode- the component'sComposedTypecode- Returns:
Boolean.TRUEif is component,Boolean.FALSEotherwise
-
isComponentRestricted
Description copied from interface:CMSComponentServiceChecks if passed as parameterAbstractCMSComponentModelis restricted restricted.- Specified by:
isComponentRestrictedin interfaceCMSComponentService- Parameters:
component- the component which is checked against any restrictions- Returns:
trueif is restricted,falseotherwise
-
isComponentUsedOutsidePage
public boolean isComponentUsedOutsidePage(AbstractCMSComponentModel component, AbstractPageModel page) Description copied from interface:CMSComponentServiceChecks if the component is used outside the page provided as reference.- Specified by:
isComponentUsedOutsidePagein interfaceCMSComponentService- Parameters:
component- The component to check.page- The page used as reference.- Returns:
Boolean.TRUEif the component is used elsewhere.Boolean.FALSEif it's never used or if it's only used in the reference page.
-
getAllParents
Description copied from interface:CMSComponentServiceGet a CMSComponent's parent components and parents' parents.- Specified by:
getAllParentsin interfaceCMSComponentService- Parameters:
cmsComponentModel- The CMS component.- Returns:
- List of all parents of a component.
-
getAllChildren
Description copied from interface:CMSComponentServiceGet a CMSComponent's all children and children's children.- Specified by:
getAllChildrenin interfaceCMSComponentService- Parameters:
cmsComponentModel- The CMS component.- Returns:
- List of all parents of a component.
-
getCmsComponentDao
-
setCmsComponentDao
-
getSystemProperties
-
setSystemProperties
-
getTypeService
-
setTypeService
-
getCatalogVersionService
-
setCatalogVersionService
-
getCmsContentSlotService
-
setCmsContentSlotService
-
getModelService
- Overrides:
getModelServicein classAbstractBusinessService- Returns:
- the
ModelService
-
setModelService
- Overrides:
setModelServicein classAbstractBusinessService
-