Class TrashPagePopulator
- java.lang.Object
-
- de.hybris.platform.cmsfacades.cmsitems.populators.TrashPagePopulator
-
public class TrashPagePopulator extends java.lang.Object implements Populator<java.util.Map<java.lang.String,java.lang.Object>,ItemModel>
TrashPagePopulator, when anAbstractPage's pageStatus attribute is changed from "Active" to "Deleted" then anyCMSNavigationEntryin anyCMSNavigationNodeassociated with this page will be deleted.
-
-
Constructor Summary
Constructors Constructor Description TrashPagePopulator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CMSAdminItemServicegetCmsAdminItemService()CMSNavigationServicegetCmsNavigationService()protected EnumerationServicegetEnumerationService()protected ModelServicegetModelService()protected booleanisPageBeingTrashed(AbstractPageModel page, java.util.Map<java.lang.String,java.lang.Object> map)Determines if a page is being trashed by checking the original pageStatus against the required pageStatus If the pageStatus will change from ACTIVE to DELETED, then the page is considered being trashed.voidpopulate(java.util.Map<java.lang.String,java.lang.Object> map, ItemModel itemModel)Populate the target instance with values from the source instance.voidsetCmsAdminItemService(CMSAdminItemService cmsAdminItemService)voidsetCmsNavigationService(CMSNavigationService cmsNavigationService)voidsetEnumerationService(EnumerationService enumerationService)voidsetModelService(ModelService modelService)
-
-
-
Method Detail
-
populate
public void populate(java.util.Map<java.lang.String,java.lang.Object> map, ItemModel itemModel) throws ConversionExceptionPopulate the target instance with values from the source instance.Removes one to many
CMSNavigationEntryin anyCMSNavigationNodethat references theAbstractPageModelpassed as a parameter- Specified by:
populatein interfacePopulator<java.util.Map<java.lang.String,java.lang.Object>,ItemModel>- Parameters:
itemModel- TheAbstractPageModelbeing populated.map- A map with at least two properties: 1.AbstractPageModel.PAGESTATUSThe required pageStatus. 2.AbstractPageMode.UIDThe uid of the page- Throws:
ConversionException
-
isPageBeingTrashed
protected boolean isPageBeingTrashed(AbstractPageModel page, java.util.Map<java.lang.String,java.lang.Object> map)
Determines if a page is being trashed by checking the original pageStatus against the required pageStatus If the pageStatus will change from ACTIVE to DELETED, then the page is considered being trashed.- Parameters:
page- TheAbstractPageModelbeing checked for pageStatus changemap- A map with at least one properties: 1.AbstractPageModel.PAGESTATUSThe required pageStatus.- Returns:
- boolean confirming if the page is being trashed.
-
getCmsNavigationService
public CMSNavigationService getCmsNavigationService()
-
setCmsNavigationService
public void setCmsNavigationService(CMSNavigationService cmsNavigationService)
-
getCmsAdminItemService
protected CMSAdminItemService getCmsAdminItemService()
-
setCmsAdminItemService
public void setCmsAdminItemService(CMSAdminItemService cmsAdminItemService)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getEnumerationService
protected EnumerationService getEnumerationService()
-
setEnumerationService
public void setEnumerationService(EnumerationService enumerationService)
-
-