public class PageLocationActivityHelper extends AbstractPageLayoutActivityHelper
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:
Constructor and Description |
---|
PageLocationActivityHelper()
Constructor for this class.
|
Modifier and Type | Method and Description |
---|---|
void | deletePageLocationESpotIfNotUsed(java.util.List<PageLocationActivityESpot> pageLocationESpotList)
This method deletes the specified Page Location ESpots, if they are not used in a web activity.
|
protected void | filterActivities(java.util.Map<java.lang.String,PageLocationActivity> pageLocationActivityMap)
This method filters the given map of Page Location Activities based upon the existence of the Pages corresponding to the ESpots present in the Page Location Activities.
|
PageLocationActivity | getNewPageLocationActivityTemplate(java.lang.String pageLocationGroup, java.lang.String storeId)
This method returns a new Page Location Activity template instance for a given Page Location Group.
|
java.util.List<PageLocationActivity> | getPageLocationActivity(java.util.List<PageLocationActivityESpot> espot, java.lang.String storeId, GetType getVerb, ShowType showVerb)
This method returns all the Page Location Activities that are defined for a set of Page Location Activity ESpot's.
|
java.util.Map<java.lang.String,PageLocationActivity> | getPageLocationActivity(java.util.List<java.lang.String> activityIdList)
This method returns the Page Location Activities for a given list of Activity Id's.
|
java.util.List<PageLocationActivity> | getPageLocationActivity(PageLocationActivityESpot espot, java.lang.String storeId, GetType getVerb, ShowType showVerb)
This method returns all the Page Location Activities that are defined for a given Page Location Activity ESpot.
|
PageLocationMediationHelper | getPageLocationMediationHelper()
Returns the Page Location Mediation Helper instance used by this class.
|
protected PageLocationActivity | instantiatePageLayoutActivity(ActivityType backingActivity)
This method instantiates a Page Location Activity using a backing Marketing Activity object.
|
protected PageLocationActivityESpot | instantiatePageLayoutActivityESpot(java.lang.String properties)
This method instantiates a new Page Location Activity ESpot passing a string of properties.
|
void | savePageLocationActivity(java.util.List<PageLocationActivity> pageLocationActivityList)
This method saves a given list of Page Location Activities to the database.
|
protected void | setESpotObjectNames(java.util.List<PageLocationActivity> pageLocationActivityList)
This method sets the Object Names of the ESpots in the given list of Page Location Activities.
|
protected void | setPageLocationMediationHelper(PageLocationMediationHelper mediationHelper)
Sets the Page Location Mediation Helper instance used by this class.
|
public PageLocationActivityHelper()
It first calls the super class constructor super() and then sets the Page Location Mediation Helper instance used by this class.
protected final void setPageLocationMediationHelper(PageLocationMediationHelper mediationHelper)
public final PageLocationMediationHelper getPageLocationMediationHelper()
protected PageLocationActivity instantiatePageLayoutActivity(ActivityType backingActivity)
protected PageLocationActivityESpot instantiatePageLayoutActivityESpot(java.lang.String properties)
public final PageLocationActivity getNewPageLocationActivityTemplate(java.lang.String pageLocationGroup, java.lang.String storeId) throws PageLayoutApplicationException
This method calls the super class method AbstractPageLayoutActivityHelper.getPageLayoutActivityTemplate(String, String) to get a new Page Location Activity Template.
public final java.util.Map<java.lang.String,PageLocationActivity> getPageLocationActivity(java.util.List<java.lang.String> activityIdList) throws PageLayoutApplicationException
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.
public final java.util.List<PageLocationActivity> getPageLocationActivity(PageLocationActivityESpot espot, java.lang.String storeId, GetType getVerb, ShowType showVerb) throws PageLayoutApplicationException
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.
public final java.util.List<PageLocationActivity> getPageLocationActivity(java.util.List<PageLocationActivityESpot> espot, java.lang.String storeId, GetType getVerb, ShowType showVerb) throws PageLayoutApplicationException
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.
public final void savePageLocationActivity(java.util.List<PageLocationActivity> pageLocationActivityList) throws PageLayoutApplicationException
This method delegates to the super class method savePageLayoutActivity(List).
public void deletePageLocationESpotIfNotUsed(java.util.List<PageLocationActivityESpot> pageLocationESpotList)
This method checks if the ESpots have no associated activities before deleting them.
protected void setESpotObjectNames(java.util.List<PageLocationActivity> pageLocationActivityList) throws PageLayoutApplicationException
Based upon the Page Groups of the ESpots in the activities, it uses the respective Client Facade and makes a service call to the respective component to fetch the names of the Objects. It sets NULL as the object name when the object no longer exists in the respective component.
protected void filterActivities(java.util.Map<java.lang.String,PageLocationActivity> pageLocationActivityMap)
A Page is assumed to be non-existent or deleted if there is no Page/Object name set in the ESpot. This method assumes that setESpotObjectNames(List) is invoked prior to invoking this method, such that the Object Names are first set for the existing Pages.
Note: Activities corresponding to a Search keyword are exempted from this filtering.