Interface CMSAdminTypeRestrictionsService
- All Known Implementing Classes:
DefaultCMSAdminTypeRestrictionsService
public interface CMSAdminTypeRestrictionsService
Service to get the type restrictions for content slots.
-
Method Summary
Modifier and TypeMethodDescriptiongetTypeRestrictionsContentSlotForPage(AbstractPageModel page, ContentSlotModel contentSlot) Get all component type restrictions for a given page and content slot.getTypeRestrictionsContentSlotForTemplate(PageTemplateModel pageTemplate, ContentSlotModel contentSlot) Get all component type restrictions for a given template and content slot.getTypeRestrictionsForContentSlot(AbstractPageModel page, ContentSlotModel contentSlot) Get all component type restrictions for a given content slot from two sources of the given page and its master template.default Set<CMSComponentTypeModel>Get all type restrictions (component types) that are allowed for a given page.
-
Method Details
-
getTypeRestrictionsContentSlotForPage
Set<CMSComponentTypeModel> getTypeRestrictionsContentSlotForPage(AbstractPageModel page, ContentSlotModel contentSlot) throws CMSItemNotFoundException Get all component type restrictions for a given page and content slot.- Parameters:
page- - the page that contains the content slot for which we want the type restrictionscontentSlot- - the content slot for which we want the type restrictions- Returns:
- a set of component types representing the type restrictions for the content slot or an empty set
- Throws:
CMSItemNotFoundException- when a required CMS item could not be found
-
getTypeRestrictionsContentSlotForTemplate
Set<CMSComponentTypeModel> getTypeRestrictionsContentSlotForTemplate(PageTemplateModel pageTemplate, ContentSlotModel contentSlot) throws CMSItemNotFoundException Get all component type restrictions for a given template and content slot.- Parameters:
pageTemplate- - the template that contains the content slot for which we want the type restrictionscontentSlot- - the content slot for which we want the type restrictions- Returns:
- a set of component types representing the type restrictions for the content slot or an empty set
- Throws:
CMSItemNotFoundException- when a required CMS item could not be found
-
getTypeRestrictionsForContentSlot
Set<CMSComponentTypeModel> getTypeRestrictionsForContentSlot(AbstractPageModel page, ContentSlotModel contentSlot) throws CMSItemNotFoundException Get all component type restrictions for a given content slot from two sources of the given page and its master template.- Parameters:
page- - the page that contains the content slot for which we want the type restrictionscontentSlot- - the content slot for which we want the type restrictions- Returns:
- a set of component types representing the type restrictions for the content slot or an empty set
- Throws:
CMSItemNotFoundException- when a required CMS item could not be found
-
getTypeRestrictionsForPage
Get all type restrictions (component types) that are allowed for a given page. It considers the given page and its master template.- Parameters:
page- - the page for which to retrieve its type restrictions (allowed component types)- Returns:
- a set of component types representing the type restrictions for the given page
-