com.ibm.commerce.store.commands

Class ExecuteSpecifiedCommandForHostedStoresCmdImpl

  • java.lang.Object
    • com.ibm.websphere.command.CacheableCommandImpl
      • com.ibm.commerce.command.MeasuredCacheableCommandImpl
        • com.ibm.commerce.command.AbstractECTargetableCommand
          • com.ibm.commerce.command.ControllerCommandImpl
            • com.ibm.commerce.store.commands.ExecuteSpecifiedCommandForHostedStoresCmdImpl
  • All Implemented Interfaces:
    com.ibm.commerce.command.AccCommand, com.ibm.commerce.command.ControllerCommand, com.ibm.commerce.command.ECCommand, com.ibm.commerce.command.ECTargetableCommand, com.ibm.commerce.security.Protectable, ExecuteSpecifiedCommandForHostedStoresCmd, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class ExecuteSpecifiedCommandForHostedStoresCmdImpl
    extends com.ibm.commerce.command.ControllerCommandImpl
    implements ExecuteSpecifiedCommandForHostedStoresCmd
    This command is invoked by the WebSphere Commerce scheduler as a site wide job. It takes any command name as a parameter. The command to execute must require only storeId to execute. It executes the specified command sequentially for all hosted stores that are in open or close state in the site. The command determines which stores are hosted by checking the storetype field in the STORE table. Valid hosted storetypes are MHS, RHS, SHS. Additional storetypes can be passed as parameters to the command. For example, these set of inventory commands could be scheduled to take care of the order flow of the entire site:
  • BalancePayment
  • PayCleanup
  • ProcessBackOrders
  • RAReallocate
  • ReleaseExpiredAllocations
  • ReleaseToFulfillment
  • ReturnCreditAndCloseScan
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getCmdName()
      Returns the name of the command to execute.
      java.util.Hashtable getInventoryCmdSet()
      Returns the hashtable of accepted inventory commands.
      java.lang.String[] getStoreType()
      Returns the set of additional storeType.
      java.util.Hashtable getStoreTypesSet()
      Returns the set of accepted storeTypes.
      boolean isValidCommand()
      Test the validity of the command.
      boolean isValidStoreType(java.lang.String inStoretype)
      Test the validity of the storetype.
      void performExecute()
      Main logic of the command.
      void setCmdName(java.lang.String commandName)
      Sets the name of the command to execute.
      void setInventoryCmdSet(java.util.Hashtable newInventoryCmdSet)
      Sets the set of valid command names.
      void setStoreType(java.lang.String[] inStoreType)
      Sets the addtional storetypes.
      void setStoreTypesSet(java.util.Hashtable newStoreTypesSet)
      Sets the valid store types
      void validateParameters()
      Verify that all the required parameters are correct.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl

        checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setRequestProperties, setResponseProperties, setRetriable, setViewInputProperties
      • Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand

        accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.command.ControllerCommand

        checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRequestProperties, setRetriable, setViewInputProperties
      • Methods inherited from interface com.ibm.commerce.command.AccCommand

        accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
      • Methods inherited from interface com.ibm.commerce.command.ECCommand

        checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.security.Protectable

        fulfills, getOwner
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ExecuteSpecifiedCommandForHostedStoresCmdImpl

        public ExecuteSpecifiedCommandForHostedStoresCmdImpl()
    • Method Detail

      • getCmdName

        public java.lang.String getCmdName()
        Returns the name of the command to execute.
        Returns:
        String The command name
      • getInventoryCmdSet

        public java.util.Hashtable getInventoryCmdSet()
        Returns the hashtable of accepted inventory commands.
        Returns:
        Hashtable The inventory command set
      • getStoreType

        public java.lang.String[] getStoreType()
        Returns the set of additional storeType.
        Returns:
        String[] The additional storeType
      • getStoreTypesSet

        public java.util.Hashtable getStoreTypesSet()
        Returns the set of accepted storeTypes.
        Returns:
        Hashtable The set of supported store types
      • isValidCommand

        public boolean isValidCommand()
        Test the validity of the command. Currently always return true.
        Returns:
        boolean True
      • isValidStoreType

        public boolean isValidStoreType(java.lang.String inStoretype)
        Test the validity of the storetype.
        Parameters:
        storetype - The storetype to check for.
        Returns:
        boolean True or false
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Main logic of the command. Execute the specified command for all open and close hosted stores.
        Specified by:
        performExecute in interface com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException - The exception thrown
      • setCmdName

        public void setCmdName(java.lang.String commandName)
        Sets the name of the command to execute.
        Parameters:
        commandName - The name of the command to execute.
      • setInventoryCmdSet

        public void setInventoryCmdSet(java.util.Hashtable newInventoryCmdSet)
        Sets the set of valid command names.
        Parameters:
        newInventoryCmdSet - The set of commands to accept
      • setStoreType

        public void setStoreType(java.lang.String[] inStoreType)
        Sets the addtional storetypes.
        Parameters:
        storeType - The additional storetypes
      • setStoreTypesSet

        public void setStoreTypesSet(java.util.Hashtable newStoreTypesSet)
        Sets the valid store types
        Parameters:
        storeTypesSet - The set of valid store types.
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        Verify that all the required parameters are correct.
        Specified by:
        validateParameters in interface com.ibm.commerce.command.ECCommand
        Overrides:
        validateParameters in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECException - The exception thrown