Class TrashPagePopulator

java.lang.Object
de.hybris.platform.cmsfacades.cmsitems.populators.TrashPagePopulator
All Implemented Interfaces:
Populator<Map<String,Object>,ItemModel>

public class TrashPagePopulator extends Object implements Populator<Map<String,Object>,ItemModel>
TrashPagePopulator, when an AbstractPage's pageStatus attribute is changed from "Active" to "Deleted" then any CMSNavigationEntry in any CMSNavigationNode associated with this page will be deleted.
  • Constructor Details

    • TrashPagePopulator

      public TrashPagePopulator()
  • Method Details

    • populate

      public void populate(Map<String,Object> map, ItemModel itemModel) throws ConversionException
      Populate the target instance with values from the source instance.

      Removes one to many CMSNavigationEntry in any CMSNavigationNode that references the AbstractPageModel passed as a parameter

      Specified by:
      populate in interface Populator<Map<String,Object>,ItemModel>
      Parameters:
      itemModel - The AbstractPageModel being populated.
      map - A map with at least two properties: 1. AbstractPageModel.PAGESTATUS The required pageStatus. 2. AbstractPageMode.UID The uid of the page
      Throws:
      ConversionException
    • isPageBeingTrashed

      protected boolean isPageBeingTrashed(AbstractPageModel page, Map<String,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 - The AbstractPageModel being checked for pageStatus change
      map - A map with at least one properties: 1. AbstractPageModel.PAGESTATUS The 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)