com.ibm.commerce.store.commands

Class StoreCategoryUpdateCmdImpl

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


    public class StoreCategoryUpdateCmdImpl
    extends com.ibm.commerce.command.ControllerCommandImpl
    implements StoreCategoryUpdateCmd
    Sets the new category to which the store belongs. StoreCategoryUpdateCmdImpl accepts the following parameters from the User Interface:
      Mandatory parameters
    • URL - View that is executed upon completion of the command
    • targetStoreId - string of store id
    • storeCategoryId - string of store id

    This command first takes new store category id String and updates it to the store whose store id matches the targetStoreId.

    • 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.StoreCategoryUpdateCmd".
      static java.lang.String COPYRIGHT
      The internal copyright field.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getOriginalStoreCategoryId()
      Returns the origStoreCategoryId.
      com.ibm.commerce.accesscontrol.AccessVector getResources()
      Returns the resources accessed by this command.
      java.lang.Long getStoreCategoryId()
      Returns the instoreCategoryId.
      java.lang.String getURL()
      Gets the URL to be redirected to when the command completes successfully.
      void performExecute()
      This static method performs the update that sets the new category to which the store belongs.
      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 setStoreCategoryId(java.lang.Long newStoreCategoryId)
      Sets the store category id.
      void setTargetStoreId(java.lang.Long newTargetStoreId)
      Sets the store id.
      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.StoreCategoryUpdateCmd".
        See Also:
        Constant Field Values
      • COPYRIGHT

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

      • StoreCategoryUpdateCmdImpl

        public StoreCategoryUpdateCmdImpl()
    • Method Detail

      • getOriginalStoreCategoryId

        public java.lang.String getOriginalStoreCategoryId()
        Returns the origStoreCategoryId.
        Returns:
        String
      • 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.
      • getStoreCategoryId

        public java.lang.Long getStoreCategoryId()
        Returns the instoreCategoryId.
        Returns:
        Long
      • 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 performs the update that sets the new category to which the store belongs.
        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
      • setStoreCategoryId

        public void setStoreCategoryId(java.lang.Long newStoreCategoryId)
        Sets the store category id. Store category Id
        Specified by:
        setStoreCategoryId in interface StoreCategoryUpdateCmd
        Parameters:
        the - store category id Long type
      • setTargetStoreId

        public void setTargetStoreId(java.lang.Long newTargetStoreId)
        Sets the store id. Store Id
        Specified by:
        setTargetStoreId in interface StoreCategoryUpdateCmd
        Parameters:
        the - 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 StoreCategoryUpdateCmd
        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.