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

Class AbstractGetBusinessObjectDocumentCmdImpl

  • 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.AbstractGetBusinessObjectDocumentCmdImpl
    • 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
      java.lang.String getFetchCommandInterface()
      This method returns the fetch command interface that has been specified on the command configuration.
      java.lang.String getInsertMoreDataCommandInterface()
      This method returns the insert more data command interface to instantiate the command implementation.
      BusinessObjectDocumentType getResultBusinessObjectDocument()
      This method returns the response business object document that represents the result of executing the request.
      SearchExpression getSearchExpression()
      Gets the SearchExpression object created in the validateExpression() method.
      java.util.Collection getUniqueID()
      This method returns a collection of unique IDs of the nouns involved with this change request.
      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 get command by calling validateExpression and performExpression.
      void setFetchCommandInterface(java.lang.String fetchCommandInterface)
      This method sets the fetch command interface that is used to resolve the fetch command implementation.
      void setInsertMoreDataCommandInterface(java.lang.String insertMoreDataCommand)
      This method sets the insert more data command interface which is used to instantiate the insert more data command.
      void setOutputProperties(com.ibm.websphere.command.TargetableCommand targetableCommand)
      This method is used for setting the command response variables from the specified target command.
      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, 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
    • Constructor Detail

      • AbstractGetBusinessObjectDocumentCmdImpl

        public AbstractGetBusinessObjectDocumentCmdImpl()
        Creates an instance of the get business object document command.
    • 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 get command by calling validateExpression and performExpression. This method controls the steps required when executing the get 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 expression.
        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.
      • getFetchCommandInterface

        public java.lang.String getFetchCommandInterface()
        This method returns the fetch command interface that has been specified on the command configuration. This interface is used to resolve the implementation used to retrieve the initial list of nouns.
        Returns:
        The fetch command interface to resolve the fetch command.
      • setFetchCommandInterface

        public void setFetchCommandInterface(java.lang.String fetchCommandInterface)
        This method sets the fetch command interface that is used to resolve the fetch command implementation.
        Parameters:
        fetchCommandInterface - The fetch command interface.
      • getInsertMoreDataCommandInterface

        public java.lang.String getInsertMoreDataCommandInterface()
        This method returns the insert more data command interface to instantiate the command implementation. The insert more data command is optional to populate additional data into the resulting list of nouns for a particular access profile.
        Returns:
        The command interface to use to instantiate the insert more data command. If null is returned then no insert more data command is used.
      • setInsertMoreDataCommandInterface

        public void setInsertMoreDataCommandInterface(java.lang.String insertMoreDataCommand)
        This method sets the insert more data command interface which is used to instantiate the insert more data command.
        Parameters:
        insertMoreDataCommand - The insert more data command interface.
      • getSearchExpression

        public SearchExpression getSearchExpression()
        Gets the SearchExpression object created in the validateExpression() method.
        Returns:
        SearchExpression The SearchExpression object.
      • 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 are 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.
      • setOutputProperties

        public void setOutputProperties(com.ibm.websphere.command.TargetableCommand targetableCommand)
        This method is used for setting the command response variables from the specified target command. In the case where this command is executed from cache, the response variables are set on the current command instance. This is the response business object document.
        Specified by:
        setOutputProperties in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        setOutputProperties in class com.ibm.websphere.command.TargetableCommandImpl
        Parameters:
        targetableCommand - The targetable command to extract the response variables from.