com.ibm.commerce.messaging.commands

Class ProductInventoryUpdateCmdImpl

  • All Implemented Interfaces:
    AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, ProductInventoryUpdateCmd, Protectable, 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 ProductInventoryUpdateCmdImpl
    extends ControllerCommandImpl
    implements ProductInventoryUpdateCmd
    The implementation of the ProductInventoryUpdate command (see interface for a detailed description of the ProductInventoryUpdate command). This class support updating inventory of extended site catalog entries with the request property of "extendedCatEntrySearch=true", in addition to inventory of regular store catalog entries. By default, its search for catalog entries will include extended site catalog entries.
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
      • iRequestPropertiesVector

        public java.util.Vector iRequestPropertiesVector
        A vector containing a request property for each update needed.
    • Constructor Detail

      • ProductInventoryUpdateCmdImpl

        public ProductInventoryUpdateCmdImpl()
    • Method Detail

      • doPostProcess

        public boolean doPostProcess(TypedProperty aRequestProperty)
                              throws ECException
        This method performs a verification check after the command executes. This method currently always returns true.
        Specified by:
        doPostProcess in interface ProductInventoryUpdateCmd
        Parameters:
        aRequestProperty - The request property.
        Returns:
        This method currently always returns true.
        Throws:
        ECException
      • doPreProcess

        public boolean doPreProcess(TypedProperty aRequestProperty)
                             throws ECException
        This method performs a verification check before the command executes. This method currently always returns true.
        Specified by:
        doPreProcess in interface ProductInventoryUpdateCmd
        Parameters:
        aRequestProperty - The request property.
        Returns:
        This method currently always returns true.
        Throws:
        ECException
      • doProcess

        public boolean doProcess(TypedProperty aRequestProperty)
                          throws ECException
        This method updates the product inventory based on the request properties. If a problem with the update occurs, an ECException will be thrown.
        Specified by:
        doProcess in interface ProductInventoryUpdateCmd
        Parameters:
        aRequestProperty - The request property.
        Returns:
        boolean
        Throws:
        ECException - Raised with message _ERR_ADM_REMOTEEXCEPTION whenever a RemoteException is thrown Raised with message _ERR_ADM_FINDEREXCEPTION whenever a FinderException is thrown Raised with message _ERR_ADM_NAMINGEXCEPTION whenever a NamingException is thrown Raised with message _ERR_ADM_CREATEEXCEPTION whenever a CreateException is thrown
      • getResourceOwners

        public java.lang.Long[] getResourceOwners()
                                           throws ECException
        This method returns the organization unit reference numbers for all the resources accessed by this command. It will return null if no resource if being accessed by this command.
        Specified by:
        getResourceOwners in interface AccCommand
        Overrides:
        getResourceOwners in class ControllerCommandImpl
        Returns:
        An array of all organization unit reference numbers
        Throws:
        ECException
      • isReadyToCallExecute

        public boolean isReadyToCallExecute()
        This method indicates whether the command is ready to execute.
        Specified by:
        isReadyToCallExecute in interface com.ibm.websphere.command.Command
        Overrides:
        isReadyToCallExecute in class AbstractECTargetableCommand
        Returns:
        • False if the parents isReadyToCallExecute() fails.
        • Otherwise true.
      • isReadyToCallExecutePerCommandInstance

        public boolean isReadyToCallExecutePerCommandInstance()
        This method indicates whether each command instance is ready to be executed.
        Returns:
        • False if the parents isReadyToCallExecute() fails.
        • False if the quantity is null.
        • False if the catalog entry ID and part number are null.
        • False if the catalog entry ID and member ID are null.
        • Otherwise true.
      • performExecute

        public void performExecute()
                            throws ECException
        This method processes each request property in the internal iRequestPropertiesVector. Before each request property is processed, a precondition check is performed. If the precondition check on the request property succeeds, the business logic(doProcess) runs followed by a postcondition check to ensure integrity is maintained. If either of the three steps fail, an ECException will be thrown.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AbstractECTargetableCommand
        Throws:
        ECException - Raised with _ERR_NCPARSER_PRODQTY_MSG_ERROR whenever isReadyToCallExecutePerCommandInstance fails Raised with _ERR_DO_PRE_PROCESS whenever doPreProcess fails Raised with _ERR_DO_PROCESS whenever doProcess fails Raised with _ERR_DO_POST_PROCESS whenever doPostProcess fails
      • setRequestPropertiesPerCommandInstance

        public void setRequestPropertiesPerCommandInstance(TypedProperty aRequestProperties)
                                                    throws ECApplicationException
        This method sets the command instance variables before processing each item in the iRequestPropertiesVector.
        Parameters:
        aRequestProperty - The request property
        Throws:
        ECApplicationException
        See Also:
        ControllerCmd#setRequestProperties(TypedProperty)