com.ibm.commerce.foundation.server.command.bod

Class AbstractChangeBusinessObjectDocumentCmdImpl

  • All Implemented Interfaces:
    BusinessObjectDocumentCmd, 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
    Direct Known Subclasses:
    AbstractChangeNounUsingBusinessObjectMediatorCmdImpl, AbstractSyncBusinessObjectDocumentCmdImpl, ChangeAttachmentCmdImpl, ChangeMemberGroupCmdImpl


    public abstract class AbstractChangeBusinessObjectDocumentCmdImpl
    extends AbstractActionBusinessObjectDocumentCmdImpl
    implements BusinessObjectDocumentCmd

    The abstract change business object document command is an abstract controller implementation for processing Change requests. The abstract controller extracts the verb from the requests and create the appropriate tasks to represent the actions. This abstract controller is responsible for the common processing logic and has specific call out to fetch and persist the data that is involved with the request.

    For the change request processing pattern, the logic is broken into three types of commands. The first command is the Change controller command that helps to break the request into smaller tasks and execute these tasks. These smaller task commands will act upon parts of the noun instead of the entire noun. The controller also attempts to fetch the required data for the request and pass this data to the other task commands so the command uses and update common data elements. This is to avoid data collision between task commands where they may act upon the same data and to avoid the performance overhead of each task commit changes and the next task must read from the database to pick up those changes. Once all the tasks are executed, the data read upfront is persisted so the changes is committed in the database.

    The second type of command is the Add, Change and Delete task commands that will perform the appropriate action on the noun. These task only needs to deal with a particular part of the noun and is passed the action to perform, the part of the noun that has changed and the original request noun along with the data that was retrieved by the controller. The controller can have many instances of these task commands to act upon the many parts that are being changed as part of the message. The controller is responsible to executing the different task commands to perform the entire change operation and these change tasks just need to work with a single noun and single part being modified.

    The final type of command is any post business logic that may result because of a change of that part of the noun. These business logic tasks may not be necessary but there are cases where post evaluation on the changed business object is needed as a result of changing specific parts. The change controller will create instances of these business tasks and execute them after performing the change actions. These tasks are given the actions performed on the part, the original request noun and the currently read and updated data that has not been persisted yet. These business logic tasks are optional so if no implementation is found then the change controller will assume no additional business logic is required.

    See Also:
    Serialized Form
    • Field Summary

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

        LOCAL
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getNounName()
      This method returns the name of the noun extracted from the request business object document.
      void setAuthorizationOnNounParts(java.lang.String authorizationOnNounParts)
      This method sets whether the authorization check should be performed on the noun or the part of the noun being changed.
      void setChangeNounPartActionCommandInterface(java.lang.String changeNounPartActionCmdInterface)
      This method sets the command interface name that represents the business logic that will perform the change noun part tasks.
      void setChangeNounPartPostActionCommandInterface(java.lang.String changeNounPartPostActionCmdInterface)
      This method sets the command interface name that represents the business logic that will perform the change noun part tasks post action logic.
      • 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, reset, 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, reset
      • Methods inherited from interface com.ibm.websphere.command.TargetableCommand

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

      • AbstractChangeBusinessObjectDocumentCmdImpl

        public AbstractChangeBusinessObjectDocumentCmdImpl()
        Creates an instance of the change controller business object document command.
    • Method Detail

      • setChangeNounPartActionCommandInterface

        public void setChangeNounPartActionCommandInterface(java.lang.String changeNounPartActionCmdInterface)
        This method sets the command interface name that represents the business logic that will perform the change noun part tasks.
        Parameters:
        changeNounPartActionCmdInterface - The change part action command interface.
      • setChangeNounPartPostActionCommandInterface

        public void setChangeNounPartPostActionCommandInterface(java.lang.String changeNounPartPostActionCmdInterface)
        This method sets the command interface name that represents the business logic that will perform the change noun part tasks post action logic.
        Parameters:
        changeNounPartPostActionCmdInterface - The change part post action command interface.
      • setAuthorizationOnNounParts

        public void setAuthorizationOnNounParts(java.lang.String authorizationOnNounParts)
        This method sets whether the authorization check should be performed on the noun or the part of the noun being changed.
        Parameters:
        authorizationOnNounParts - Whether the authroization check should be performed on the noun or the noun part.
      • getNounName

        public java.lang.String getNounName()
        This method returns the name of the noun extracted from the request business object document.
        Returns:
        The name of the noun.