com.ibm.commerce.store.commands

Class StoreOpenCmdImpl

  • 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.StoreOpenCmdImpl
  • 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, StoreOpenCmd, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class StoreOpenCmdImpl
    extends com.ibm.commerce.command.ControllerCommandImpl
    implements StoreOpenCmd
    Changes the store state to open. StoreOpenCmd accepts the following parameters from the User Interface:
      Mandatory parameters
    • URL - URL that is executed upon completion of the command
    • targetStoreId - string of store id

    This command first take target store id String and then iteratively calls the ManageStoreCmd task command to update store state to open, efresh store registry and invalidate WebSphere Application Server cache

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASSNAME
      The name of this interface is "com.ibm.commerce.store.commands.StoreCloseCmd".
      static java.lang.String COPYRIGHT
      The internal copyright field.
    • Constructor Summary

      Constructors 
      Constructor and Description
      StoreOpenCmdImpl() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      com.ibm.commerce.accesscontrol.AccessVector getResources()
      Returns the resources accessed by this command.
      java.lang.String getURL()
      Gets the URL to be redirected to when the command completes successfully.
      void performExecute()
      This static method perform closing a store (Call ManageStore task command, update store state to close, refresh store registry and invalidate WAS cache.)
      void reset()
      This method should be called after a command has been executed to reset its state variables.
      void setRequestProperties(com.ibm.commerce.datatype.TypedProperty requestProperties)
      The WebController calls the setRequestProperties method before invoking the execute method in this command.
      void setTargetStoreId(java.lang.Long[] newTargetStoreId)
      Sets the list of targetStoreId to Opened.
      void setURL(java.lang.String newUrl)
      Sets the URL to be redirected to when the command completes successfully.
      void validateParameters()
      Check mandatory parameters.
      • 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, 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, getStoreId, getUser, getUserId, isReadyToCallExecute, 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, 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, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
      • Methods inherited from interface com.ibm.commerce.security.Protectable

        fulfills, getOwner
    • Field Detail

      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The name of this interface is "com.ibm.commerce.store.commands.StoreCloseCmd".
        See Also:
        Constant Field Values
      • COPYRIGHT

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

      • StoreOpenCmdImpl

        public StoreOpenCmdImpl()
    • Method Detail

      • getResources

        public com.ibm.commerce.accesscontrol.AccessVector getResources()
                                                                 throws com.ibm.commerce.exception.ECException
        Returns the resources accessed by this command. For this command, the resource accessed is the Store.

        Specified by:
        getResources in interface com.ibm.commerce.command.ECCommand
        Overrides:
        getResources in class com.ibm.commerce.command.AbstractECTargetableCommand
        Returns:
        AccessVector - a vector of resource action pairs
        Throws:
        com.ibm.commerce.exception.ECException - - The exception.
      • getURL

        public java.lang.String getURL()
        Gets the URL to be redirected to when the command completes successfully.
        Returns:
        the URL string to be redirected
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        This static method perform closing a store (Call ManageStore task command, update store state to close, refresh store registry and invalidate WAS cache.)
        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.
      • reset

        public void reset()
        This method should be called after a command has been executed to reset its state variables.
        Overrides:
        reset in class com.ibm.commerce.command.AbstractECTargetableCommand
      • setRequestProperties

        public void setRequestProperties(com.ibm.commerce.datatype.TypedProperty requestProperties)
                                  throws com.ibm.commerce.exception.ECException
        The WebController calls the setRequestProperties method before invoking the execute method in this command. It is the responsibility of the implementer of the ControllerCommand to extract the required input parameters from the request properties and perform parameter checking.
        Specified by:
        setRequestProperties in interface com.ibm.commerce.command.ControllerCommand
        Overrides:
        setRequestProperties in class com.ibm.commerce.command.ControllerCommandImpl
        Parameters:
        requestProperties - com.ibm.commerce.datatype.TypedProperty
        Throws:
        com.ibm.commerce.exception.ECApplicationException.
        com.ibm.commerce.exception.ECException
      • setTargetStoreId

        public void setTargetStoreId(java.lang.Long[] newTargetStoreId)
        Sets the list of targetStoreId to Opened. Store Id list
        Specified by:
        setTargetStoreId in interface StoreOpenCmd
        Parameters:
        the - array of store id Long type
      • setURL

        public void setURL(java.lang.String newUrl)
        Sets the URL to be redirected to when the command completes successfully.
        Specified by:
        setURL in interface StoreOpenCmd
        Parameters:
        the - URL string to be redirected
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        Check mandatory parameters.
        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.