com.ibm.commerce.pagelayout.facade.server.helpers.activity.pagelocation

Class PageLocationActivityHelper



  • public class PageLocationActivityHelper
    extends AbstractPageLayoutActivityHelper
    This is a helper class for Marketing Activity operations for Page Locations. It encapsulates the low level Activity details and exposes wrapper classes such as PageLocationActivity which are simplified for use with Page Location Activity operations.

    Each Page Location details are saved in a Marketing Activity. These Activities have a specific structure which are generally not used from the Marketing Tool of WebSphere Commerce Management Center (CMC). For example, each Page Location Activity has a specific Action called "Show Page Layout" which is not shown in the Marketing Tool in CMC.

    This helper class provides methods to do the following:

    • Fetch Page Location Activity Templates and tailor them to make it specific for use with Page Locations. These templates are used to create new Page Location Activities.
    • Fetch Page Location Activities for given list of Activity Id's.
    • Fetch all Page Location Activities for a Store Page. Store Pages are denoted using ESpots using naming conventions such as "Category_10351", which denotes a Category Page for the Category Id 10351.
    • Persist the changes to the Page Location Activities back to the database.
    • Mediate Page Locations from Page Location Activities.

    See Also:
    AbstractPageLayoutActivityHelper
    • Constructor Detail

      • PageLocationActivityHelper

        public PageLocationActivityHelper()
        Constructor for this class.

        It first calls the super class constructor super() and then sets the Page Location Mediation Helper instance used by this class.

    • Method Detail

      • getPageLocationMediationHelper

        public final PageLocationMediationHelper getPageLocationMediationHelper()
        Returns the Page Location Mediation Helper instance used by this class.
        Returns:
        the page location mediation helper instance.
      • getPageLocationActivity

        public final java.util.Map<java.lang.String,PageLocationActivity> getPageLocationActivity(java.util.List<java.lang.String> activityIdList)
                                                                                           throws PageLayoutApplicationException
        This method returns the Page Location Activities for a given list of Activity Id's.

        This method first invokes the super class method AbstractPageLayoutActivityHelper.getPageLayoutActivity(List) to get a list of Page Location Activities. Then it calls setESpotObjectNames(List) to set the Object names of the Pages that correspond to the ESpots in these Page Location Activities. Finally, it calls filterActivities(Map) to filter out the activities containing ESpots corresponding to Pages that may not exist any more.

        Parameters:
        activityIdList - The given list of Activity Id's.
        Returns:
        A map of Page Location Activities with Page Location Activity as the key.
        Throws:
        PageLayoutApplicationException - If any exception occurs.
      • getPageLocationActivity

        public final java.util.List<PageLocationActivity> getPageLocationActivity(PageLocationActivityESpot espot,
                                                                                  java.lang.String storeId,
                                                                                  GetType getVerb,
                                                                                  ShowType showVerb)
                                                                           throws PageLayoutApplicationException
        This method returns all the Page Location Activities that are defined for a given Page Location Activity ESpot.

        This method first invokes the super class method getPageLayoutActivity to get a list of Page Location Activities. Then it calls setESpotObjectNames(List) to set the Object names of the Pages that correspond to the ESpots in these Page Location Activities.

        Note: Unlike getPageLocationActivity(List), this method does not filter the resultant list of Page Location Activities. This method assumes that the Page indicated by the given Page Location Activity ESpot exists.

        Parameters:
        espot - The given Page Location Activity ESpot.
        storeId - The Store Id of the Page Location Activity ESpot. Can be null. If the Store Id is null, then this method will return Page Location Activities for the store path.
        getVerb - (Optional) The Get verb from the requesting service. This method delegates the pagination parameters from this Get verb to the Get verb in the request to the Marketing Component.
        showVerb - (Optional) The Show verb for the requesting service. This method sets response of the pagination parameters from the Show verb received back from the Marketing Component to the Show verb of the requesting service.
        Returns:
        The list of Page Location Activities defined for the given Page Location Activity ESpot.
        Throws:
        PageLayoutApplicationException - If any exception occurs.
      • getPageLocationActivity

        public final java.util.List<PageLocationActivity> getPageLocationActivity(java.util.List<PageLocationActivityESpot> espot,
                                                                                  java.lang.String storeId,
                                                                                  GetType getVerb,
                                                                                  ShowType showVerb)
                                                                           throws PageLayoutApplicationException
        This method returns all the Page Location Activities that are defined for a set of Page Location Activity ESpot's.

        This method first invokes the super class method getPageLayoutActivity to get a list of Page Location Activities. Then it calls setESpotObjectNames(List) to set the Object names of the Pages that correspond to the ESpots in these Page Location Activities.

        Note: Unlike getPageLocationActivity(List), this method does not filter the resultant list of Page Location Activities. This method assumes that the Page indicated by the given Page Location Activity ESpot exists.

        Parameters:
        espot - A list of Page Location Activity ESpot's.
        storeId - The Store Id of the Page Location Activity ESpot. Can be null. If the Store Id is null, then this method will return Page Location Activities for the store path.
        getVerb - (Optional) The Get verb from the requesting service. This method delegates the pagination parameters from this Get verb to the Get verb in the request to the Marketing Component.
        showVerb - (Optional) The Show verb for the requesting service. This method sets response of the pagination parameters from the Show verb received back from the Marketing Component to the Show verb of the requesting service.
        Returns:
        The list of Page Location Activities defined for the given Page Location Activity ESpot.
        Throws:
        PageLayoutApplicationException - If any exception occurs.
      • deletePageLocationESpotIfNotUsed

        public void deletePageLocationESpotIfNotUsed(java.util.List<PageLocationActivityESpot> pageLocationESpotList)
        This method deletes the specified Page Location ESpots, if they are not used in a web activity. All the page locations must belong to the same store or e-site/asset store relation.

        This method checks if the ESpots have no associated activities before deleting them.

        Parameters:
        pageLocationESpotList - A list of Page Location ESpot Names to be deleted.