com.ibm.commerce.foundation.server.command.soi

Class MessageMappingCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.TargetableCommandImpl
      • com.ibm.websphere.command.CacheableCommandImpl
        • com.ibm.commerce.foundation.server.command.soi.MessageMappingCmdImpl
  • 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:
    AttachmentMessageMappingCmdImpl, ManagedDirectoryMessageMappingCmdImpl, OrderMessageMappingCmdImpl


    public class MessageMappingCmdImpl
    extends com.ibm.websphere.command.CacheableCommandImpl
    implements BusinessObjectDocumentCmd
    This business object document command leverages the messaging mapping feature to invoke an existing Name-Value pair WebSphere Commerce command and build the response object. The message mapping configuration controls the command to invoke and converts the business object document into a set of name value pairs to pass to the WebSphere Commerce NVP controller command. The responseCommand or errorCommand found in the control parameters returned by the message mapping configuration points to the code to create the response message.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String BUSINESS_OBJECT_DOCUMENT_REQUEST_CONTROL_PARAMETERS
      The property name used to place the request control parameters into the request properties.
      static java.lang.String BUSINESS_OBJECT_DOCUMENT_REQUEST_OBJECT
      The property name used to place the request business object document into the request properties.
      static java.lang.String COMPONENT_SERVICES_MESSAGE_MAPPER
      The Message Mapper Name for component services
      • Fields inherited from class com.ibm.websphere.command.TargetableCommandImpl

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

        serialVersionUID
    • Constructor Summary

      Constructors 
      Constructor and Description
      MessageMappingCmdImpl()
      Creates an instance of the message mapping command to invoke classic commerce controller commands using the message mapping feature.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      BusinessObjectDocumentType getResultBusinessObjectDocument()
      This method returns the response business object document for the request.
      void handleException(java.lang.Exception exception)
      A final method that for internal use only in MessageMappingCmdImpl In order to add Exception Handling for SOI command, use "errorCommand" approach to define a command to generate the error response.
      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)
      Sets the request business object document.
      • Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl

        execute, 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
    • Field Detail

      • COMPONENT_SERVICES_MESSAGE_MAPPER

        public static final java.lang.String COMPONENT_SERVICES_MESSAGE_MAPPER
        The Message Mapper Name for component services
        See Also:
        Constant Field Values
      • BUSINESS_OBJECT_DOCUMENT_REQUEST_OBJECT

        public static final java.lang.String BUSINESS_OBJECT_DOCUMENT_REQUEST_OBJECT
        The property name used to place the request business object document into the request properties.
        See Also:
        Constant Field Values
      • BUSINESS_OBJECT_DOCUMENT_REQUEST_CONTROL_PARAMETERS

        public static final java.lang.String BUSINESS_OBJECT_DOCUMENT_REQUEST_CONTROL_PARAMETERS
        The property name used to place the request control parameters into the request properties.
        See Also:
        Constant Field Values
    • Constructor Detail

      • MessageMappingCmdImpl

        public MessageMappingCmdImpl()
        Creates an instance of the message mapping command to invoke classic commerce controller commands using the message mapping feature.
    • 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 final void handleException(java.lang.Exception exception)
        A final method that for internal use only in MessageMappingCmdImpl In order to add Exception Handling for SOI command, use "errorCommand" approach to define a command to generate the error response.
        Specified by:
        handleException in interface BusinessObjectDocumentCmd
        Parameters:
        exception - The exception is being thrown