public class DefaultCMSAdminTypeRestrictionsService extends AbstractCMSAdminService implements CMSAdminTypeRestrictionsService
To get the type restrictions for a given page and content slot, first we get the ContentSlotForPageModel
representing the relation between the page and the content slot. Then, we get the ContentSlotNameModel from
ContentSlotForPageModel.POSITION. From there, we can get the type restrictions from
ContentSlotNameModel.COMPTYPEGROUP.
AbstractService.SerializableDTOACTIVECATALOGVERSION, ACTIVESITEmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultCMSAdminTypeRestrictionsService() |
getActiveCatalogVersion, getActiveSite, getUserService, setUserServicegetModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerafterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, setTenantScope, writeReplacepublic DefaultCMSAdminTypeRestrictionsService()
public Set<CMSComponentTypeModel> getTypeRestrictionsContentSlotForTemplate(PageTemplateModel pageTemplate, ContentSlotModel contentSlot) throws CMSItemNotFoundException
CMSAdminTypeRestrictionsServicegetTypeRestrictionsContentSlotForTemplate in interface CMSAdminTypeRestrictionsServicepageTemplate - - the template that contains the content slot for which we want the type restrictionscontentSlot - - the content slot for which we want the type restrictionsCMSItemNotFoundException - when a required CMS item could not be foundpublic Set<CMSComponentTypeModel> getTypeRestrictionsContentSlotForPage(AbstractPageModel page, ContentSlotModel contentSlot) throws CMSItemNotFoundException
CMSAdminTypeRestrictionsServicegetTypeRestrictionsContentSlotForPage in interface CMSAdminTypeRestrictionsServicepage - - the page that contains the content slot for which we want the type restrictionscontentSlot - - the content slot for which we want the type restrictionsCMSItemNotFoundException - when a required CMS item could not be foundpublic Set<CMSComponentTypeModel> getTypeRestrictionsForContentSlot(AbstractPageModel page, ContentSlotModel contentSlot) throws CMSItemNotFoundException
CMSAdminTypeRestrictionsServicegetTypeRestrictionsForContentSlot in interface CMSAdminTypeRestrictionsServicepage - - the page that contains the content slot for which we want the type restrictionscontentSlot - - the content slot for which we want the type restrictionsCMSItemNotFoundException - when a required CMS item could not be foundprotected Set<CMSComponentTypeModel> getMergedTypeRestrictionForContentSlot(List<ContentSlotNameModel> availableContentSlots, String contentSlotForNamePosition) throws CMSItemNotFoundException
ContentSlotNameModel.getValidComponentTypes() and
ComponentTypeGroupModel.getCmsComponentTypes()CMSItemNotFoundExceptionprotected Set<CMSComponentTypeModel> getCmsComponentTypesFromContentSlotNameComponentTypeGroup(ContentSlotNameModel contentSlotName)
contentSlotName - - the content slot nameprotected Set<CMSComponentTypeModel> getCmsComponentTypesFromContentSlotNameValidComponentTypes(ContentSlotNameModel contentSlotName)
contentSlotName - - the content slot nameprotected CMSContentSlotDao getCmsContentSlotDao()
public void setCmsContentSlotDao(CMSContentSlotDao contentSlotDao)
protected CMSAdminSiteService getCmsAdminSiteService()
public void setCmsAdminSiteService(CMSAdminSiteService cmsAdminSiteService)
Copyright © 2017 SAP SE. All Rights Reserved.