public class DefaultPageContentSlotComponentFacade extends java.lang.Object implements PageContentSlotComponentFacade
PageContentSlotComponentFacade. This implementation will expect that a catalog
version has been placed into a local session.| Constructor and Description |
|---|
DefaultPageContentSlotComponentFacade() |
| Modifier and Type | Method and Description |
|---|---|
PageContentSlotComponentData |
addComponentToContentSlot(PageContentSlotComponentData pageContentSlotComponent)
Add an existing component item into a specific index position of an existing content slot.
|
protected PageContentSlotComponentData |
buildPageContentSlotComponent(java.lang.String pageId,
java.lang.String slotId,
java.lang.Integer position,
AbstractCMSComponentModel component)
Build a single
PageContentSlotComponentData |
protected java.util.stream.Stream<PageContentSlotComponentData> |
buildPageContentSlotComponentStream(java.lang.String pageId,
ContentSlotData contentSlot)
Build a stream of
PageContentSlotComponentData |
protected PageContentSlotComponentData |
buildPageContentSlotComponentValidationDto(java.lang.String slotId,
PageContentSlotComponentData pageContentSlotComponentData)
Build a new DTO for validating adding existing component to content slot.
|
protected AbstractCMSComponentModel |
fetchComponent(java.lang.String componentId) |
protected ContentSlotModel |
fetchContentSlot(java.lang.String slotId) |
protected CMSAdminComponentService |
getAdminComponentService() |
protected CMSAdminContentSlotService |
getAdminContentSlotService() |
protected CMSAdminPageService |
getAdminPageService() |
protected CatalogVersionService |
getCatalogVersionService() |
Validator |
getComponentExistsInSlotValidator() |
protected Validator |
getCreatePageContentSlotComponentCompositeValidator() |
protected FacadeValidationService |
getFacadeValidationService() |
java.util.List<PageContentSlotComponentData> |
getPageContentSlotComponentsByPageId(java.lang.String pageId)
Get a list of content slot with their components and their position in the slots for a given page.
|
protected SessionSearchRestrictionsDisabler |
getSessionSearchRestrictionsDisabler() |
PlatformTransactionManager |
getTransactionManager() |
protected UniqueItemIdentifierService |
getUniqueItemIdentifierService() |
protected Validator |
getUpdatePageContentSlotComponentValidator() |
PageContentSlotComponentData |
moveComponent(java.lang.String pageUid,
java.lang.String componentUid,
java.lang.String originSlotUid,
PageContentSlotComponentData pageContentSlotComponentData)
Moves a component within a slot or between slots.
|
void |
removeComponentFromContentSlot(java.lang.String slotId,
java.lang.String componentId)
Remove a component item from a content slot.
|
void |
setAdminComponentService(CMSAdminComponentService adminComponentService) |
void |
setAdminContentSlotService(CMSAdminContentSlotService adminContentSlotService) |
void |
setAdminPageService(CMSAdminPageService adminPageService) |
void |
setCatalogVersionService(CatalogVersionService catalogVersionService) |
void |
setComponentExistsInSlotValidator(Validator componentExistsInSlotValidator) |
void |
setCreatePageContentSlotComponentCompositeValidator(Validator createPageContentSlotComponentCompositeValidator) |
void |
setFacadeValidationService(FacadeValidationService facadeValidationService) |
void |
setSessionSearchRestrictionsDisabler(SessionSearchRestrictionsDisabler sessionSearchRestrictionsDisabler) |
void |
setTransactionManager(PlatformTransactionManager transactionManager) |
void |
setUniqueItemIdentifierService(UniqueItemIdentifierService uniqueItemIdentifierService) |
void |
setUpdatePageContentSlotComponentValidator(Validator updatePageContentSlotComponentValidator) |
public DefaultPageContentSlotComponentFacade()
public java.util.List<PageContentSlotComponentData> getPageContentSlotComponentsByPageId(java.lang.String pageId) throws CMSItemNotFoundException
PageContentSlotComponentFacadegetPageContentSlotComponentsByPageId in interface PageContentSlotComponentFacadepageId - - the page for which to look up the content slots forCMSItemNotFoundException - when the page cannot be foundprotected java.util.stream.Stream<PageContentSlotComponentData> buildPageContentSlotComponentStream(java.lang.String pageId, ContentSlotData contentSlot)
PageContentSlotComponentData.pageId - - the page idcontentSlot - - the content slotprotected PageContentSlotComponentData buildPageContentSlotComponent(java.lang.String pageId, java.lang.String slotId, java.lang.Integer position, AbstractCMSComponentModel component)
PageContentSlotComponentData.pageId - - the page idslotId - - the slot idposition - - the position of the component in the slotcomponent - - the CMS component modelpublic PageContentSlotComponentData addComponentToContentSlot(PageContentSlotComponentData pageContentSlotComponent) throws CMSItemNotFoundException
PageContentSlotComponentFacadeIf the index provided is larger than or equal to the next available component index in the slot, then the component will be added into the next available index.
addComponentToContentSlot in interface PageContentSlotComponentFacadepageContentSlotComponent - - DTO holding required attributes; never nullCMSItemNotFoundException - when the component or slot cannot be foundpublic void removeComponentFromContentSlot(java.lang.String slotId,
java.lang.String componentId)
throws CMSItemNotFoundException
PageContentSlotComponentFacaderemoveComponentFromContentSlot in interface PageContentSlotComponentFacadeslotId - - the unique identifier of the content slot; never nullcomponentId - - the unique identifier of the component item; never nullCMSItemNotFoundException - when the component or slot cannot be foundpublic PageContentSlotComponentData moveComponent(java.lang.String pageUid, java.lang.String componentUid, java.lang.String originSlotUid, PageContentSlotComponentData pageContentSlotComponentData) throws CMSItemNotFoundException
PageContentSlotComponentFacademoveComponent in interface PageContentSlotComponentFacadepageUid - Page UIDcomponentUid - UID of the component to moveoriginSlotUid - The UID of the content slot that contains the origin content slotpageContentSlotComponentData - PageContentSlotComponentData The component which contains all information of it's final
destinationCMSItemNotFoundException - when the component or slot cannot be foundprotected AbstractCMSComponentModel fetchComponent(java.lang.String componentId) throws CMSItemNotFoundException
CMSItemNotFoundExceptionprotected ContentSlotModel fetchContentSlot(java.lang.String slotId) throws CMSItemNotFoundException
CMSItemNotFoundExceptionprotected PageContentSlotComponentData buildPageContentSlotComponentValidationDto(java.lang.String slotId, PageContentSlotComponentData pageContentSlotComponentData)
slotId - pageContentSlotComponentData - protected CMSAdminPageService getAdminPageService()
public void setAdminPageService(CMSAdminPageService adminPageService)
protected CMSAdminContentSlotService getAdminContentSlotService()
public void setAdminContentSlotService(CMSAdminContentSlotService adminContentSlotService)
protected CMSAdminComponentService getAdminComponentService()
public void setAdminComponentService(CMSAdminComponentService adminComponentService)
protected Validator getCreatePageContentSlotComponentCompositeValidator()
public void setCreatePageContentSlotComponentCompositeValidator(Validator createPageContentSlotComponentCompositeValidator)
protected FacadeValidationService getFacadeValidationService()
public void setFacadeValidationService(FacadeValidationService facadeValidationService)
protected Validator getUpdatePageContentSlotComponentValidator()
public void setUpdatePageContentSlotComponentValidator(Validator updatePageContentSlotComponentValidator)
public PlatformTransactionManager getTransactionManager()
public void setTransactionManager(PlatformTransactionManager transactionManager)
public Validator getComponentExistsInSlotValidator()
public void setComponentExistsInSlotValidator(Validator componentExistsInSlotValidator)
protected UniqueItemIdentifierService getUniqueItemIdentifierService()
public void setUniqueItemIdentifierService(UniqueItemIdentifierService uniqueItemIdentifierService)
protected CatalogVersionService getCatalogVersionService()
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
protected SessionSearchRestrictionsDisabler getSessionSearchRestrictionsDisabler()
public void setSessionSearchRestrictionsDisabler(SessionSearchRestrictionsDisabler sessionSearchRestrictionsDisabler)
Copyright © 2018 SAP SE. All Rights Reserved.