com.ibm.commerce.pagelayout.facade.server.commands

Class ChangeLayoutPageLocationPartCmdImpl

  • All Implemented Interfaces:
    AbstractChangeNounPartActionCmd, AbstractSyncNounPartActionCmd, ChangeLayoutPartActionCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class ChangeLayoutPageLocationPartCmdImpl
    extends AbstractChangeNounPartUsingBusinessObjectMediatorCmdImpl
    implements ChangeLayoutPartActionCmd
    This command implementation is used to modify the page location noun parts of layout, and performs validation for Add(Create)/Change(Update)/Delete(Remove) page locations. This command is given the layout nouns and each with a list of action expressions to act upon the noun.
      Modifies the page location noun parts of layout:
    • Group the action expressions to be Added(Created)/Changed(Updated)/Deleted(Removed), and perform the action expressions in a batch, which will delegate to PageLocationActivityHelper.
    • Calls super.performExecute() to perform the operations related to physical entities of Page Location, which will be delegated to ChangeLayoutPageLocationPartMediator
      Performs validation:
    • Calls super.validate() to validate against each noun part specified by the action expressions, which will delegate to ChangeLayoutPageLocationPartMediator
    • Validates all the Page Locations to be Added with existing Page Locations for the layout, make sure that for the same Page Group: The Page Id + Sub Page Group or Keyword cannot be duplicate.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class com.ibm.websphere.command.TargetableCommandImpl

        LOCAL
      • Fields inherited from interface com.ibm.websphere.command.Command

        serialVersionUID
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void performExecute()
      This method performs the main logic of this command.
      void reset()
      This method resets the command so it can be reused.
      void setPageLocationActivityHelper(java.lang.String activityHelperClassName)
      This method sets the Page Location Activity Helper used by this class.
      void validate()
      Validates the Page Location noun parts based on the actions requested on the noun part.
      • Methods inherited from class com.ibm.commerce.command.MeasuredCacheableCommandImpl

        execute
      • Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl

        executeFromCache, getCaller, getEntryInfo, getId, getObjectSize, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
      • Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl

        getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.ibm.websphere.command.Command

        execute, isReadyToCallExecute
      • Methods inherited from interface com.ibm.websphere.command.TargetableCommand

        getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
    • Constructor Detail

      • ChangeLayoutPageLocationPartCmdImpl

        public ChangeLayoutPageLocationPartCmdImpl()
        This method is the default constructor. It calls the parent method.
    • Method Detail

      • reset

        public void reset()
        This method resets the command so it can be reused.
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractChangeNounPartActionCmdImpl
        See Also:
        CacheableCommandImpl.reset()
      • performExecute

        public void performExecute()
                            throws java.lang.Exception
          This method performs the main logic of this command.
        • First, calls corresponding method to Create/Update/Delete Page Location Activities for all the Page Locations be Added(Created)/Changed(Updated)/Deleted(Removed) in a batch, which will delegate to PageLocationActivityHelper.
        • Then, calls super.performExecute() to Add(Create)/Change(Update)/Delete(Remove) Page Location physical entities for each Action Expression, which will delegate to ChangeLayoutPageLocationPartMediator.
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractChangeNounPartActionCmdImpl
        Throws:
        java.lang.Exception - If problem occurred when performing the action expression.
      • validate

        public void validate()
                      throws AbstractApplicationException
        Validates the Page Location noun parts based on the actions requested on the noun part.
        • Calls super.validate() to validate against each noun part specified by the action expressions, which will delegate to ChangeLayoutPageLocationPartMediator
        • Iterates though the action expressions and gets all the Page Location noun parts that to be Added(Created)/Changed(Updated)/Deleted(Removed) respectively into 3 maps.
        • Validates that the Page Locations to be added and updated does not duplicate with each other, and also make sure they do not duplicate with the existing Page Location for the Layout. Thus making sure for all Page Locations in the layout, for the same Page Group that:
          1) The Page Id + Sub Page Group- Should not be duplicate.
          2) The Keyword - Should not be duplicate.
        Specified by:
        validate in interface AbstractChangeNounPartActionCmd
        Overrides:
        validate in class AbstractChangeNounPartUsingBusinessObjectMediatorCmdImpl
        Throws:
        AbstractApplicationException - There is invalid information specified with the business object document request which will prevent the request from executing.
        See Also:
        AbstractChangeNounPartActionCmd.validate()
      • setPageLocationActivityHelper

        public void setPageLocationActivityHelper(java.lang.String activityHelperClassName)
                                           throws PageLayoutSystemException
        This method sets the Page Location Activity Helper used by this class.
        Parameters:
        activityHelperClassName - The fully qualified class name of the Page Location Activity Helper to set. This class should inherit from PageLocationActivityHelper.
        Throws:
        PageLayoutSystemException