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

Class AbstractActionBusinessObjectDocumentCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.TargetableCommandImpl
      • com.ibm.websphere.command.CacheableCommandImpl
        • com.ibm.commerce.command.MeasuredCacheableCommandImpl
          • com.ibm.commerce.foundation.server.command.bod.AbstractActionBusinessObjectDocumentCmdImpl
  • 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:
    AbstractChangeBusinessObjectDocumentCmdImpl, AbstractProcessBusinessObjectDocumentCmdImpl


    public abstract class AbstractActionBusinessObjectDocumentCmdImpl
    extends com.ibm.commerce.command.MeasuredCacheableCommandImpl
    implements BusinessObjectDocumentCmd

    An abstract implementation of a command that represents the any verb that contains actions when dealing with business object documents. This abstract class provides the structure and object hierarchy to follow when creating a command to represent the action based verb. Any command implementation that represents action enabled verb of a business object document should extend from this abstract implementation.

    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
      BusinessObjectDocumentType getResultBusinessObjectDocument()
      This method returns the response business object document that represents the result of executing the request.
      java.util.Collection getUniqueID()
      This method returns a collection of unique IDs of the nouns involved with this change request.
      java.lang.String getUniqueIDXPath()
      This method returns the XPath expression from the noun to use to retrieve the unique ID of the noun.
      void handleException(java.lang.Exception exception)
      This method sets the exception as the result of executing the request.
      boolean isReadyToCallExecute()
      This method always indicates the command is ready to execute.
      void performExecute()
      This method will execute the change command by calling validateAction and performAction.
      void setRequestBusinessObjectDocument(BusinessObjectDocumentType businessObjectDocument)
      This method sets the request business object document of the business logic to execute.
      void setUniqueIDXPath(java.lang.String uniqueIDXPath)
      This method sets the XPath expression from the noun to use to retrieve the unique ID of the noun.
      • 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, reset
      • Methods inherited from interface com.ibm.websphere.command.TargetableCommand

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

      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        This method always indicates the command is ready to execute.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Specified by:
        isReadyToCallExecute in class com.ibm.websphere.command.TargetableCommandImpl
        Returns:
        Always true.
        See Also:
        Command.isReadyToCallExecute()
      • performExecute

        public final void performExecute()
                                  throws java.lang.Exception
        This method will execute the change command by calling validateAction and performAction. This method controls the steps required when executing the change verb.
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Specified by:
        performExecute in class com.ibm.websphere.command.TargetableCommandImpl
        Throws:
        java.lang.Exception - Can occur if the validation of the business object document fails or a problem occur when performing the action.
        See Also:
        TargetableCommand.performExecute()
      • handleException

        public void handleException(java.lang.Exception exception)
        This method sets the exception as the result of executing the request. The command implementation uses this call out method to populate the response business object document with the exception information. Although the getResultBusinessObjectDocument() will still be used to return the result, this call out will indicate that exception information is required to be populated.
        Specified by:
        handleException in interface BusinessObjectDocumentCmd
        Parameters:
        exception - The application exception that occurred when executing the business object document.
      • getUniqueID

        public java.util.Collection getUniqueID()

        This method returns a collection of unique IDs of the nouns involved with this change request. This list of unique IDs is to indicate which nouns have been involved with the request and requires to be invalidated. An example of defining the invalidation configuration is as follows.

                <invalidation>catalog
                        <component id="getUniqueID" type="method" multipleIDs="true">
                                <required>true</required>
                        </component>
                </invalidation>
         
        Returns:
        A collection of Noun UniqueIDs that is involved with the current business object document request.
      • setUniqueIDXPath

        public void setUniqueIDXPath(java.lang.String uniqueIDXPath)
        This method sets the XPath expression from the noun to use to retrieve the unique ID of the noun. This is used when resolving a collections of the noun unique ID that can be used for invalidation keys for cachable commands. It is recommended that this property is set on the command configuration when used for cache invalidation.
        Parameters:
        uniqueIDXPath - The XPath expression to get the uniqueID of the noun.
      • getUniqueIDXPath

        public java.lang.String getUniqueIDXPath()
        This method returns the XPath expression from the noun to use to retrieve the unique ID of the noun.
        Returns:
        The XPath expression to get the uniqueID of the noun.