Class TrashPagePopulator

  • All Implemented Interfaces:
    Populator<java.util.Map<java.lang.String,​java.lang.Object>,​ItemModel>

    public class TrashPagePopulator
    extends java.lang.Object
    implements Populator<java.util.Map<java.lang.String,​java.lang.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 Detail

      • TrashPagePopulator

        public TrashPagePopulator()
    • Method Detail

      • populate

        public void populate​(java.util.Map<java.lang.String,​java.lang.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<java.util.Map<java.lang.String,​java.lang.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,
                                             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 - 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.
      • setCmsNavigationService

        public void setCmsNavigationService​(CMSNavigationService cmsNavigationService)
      • setCmsAdminItemService

        public void setCmsAdminItemService​(CMSAdminItemService cmsAdminItemService)
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)
      • setEnumerationService

        public void setEnumerationService​(EnumerationService enumerationService)