com.ibm.commerce.collaboration.livehelp.commands

Class CCQueueAssignCmdImpl

  • 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.tools.command.ToolsControllerCommandImpl
              • com.ibm.commerce.collaboration.livehelp.commands.CCQueueAssignCmdImpl
  • All Implemented Interfaces:
    CCQueueAssignCmd, 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, com.ibm.commerce.tools.command.ToolsControllerCommand, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command


    public class CCQueueAssignCmdImpl
    extends com.ibm.commerce.tools.command.ToolsControllerCommandImpl
    implements CCQueueAssignCmd
    Controller command to be used by Commerce Accelerator to assign CSR to a Customer Care Queue for the store It uses QueueAccessBean to updates the ALLCSR field. If all CSR are allowed to access the queue, it uses QueueCSRAccessBean removes all CSR assignment from QueueCSR table otherwise, it only removes revoked CSR assignment and add newly assigned CSRs, then it redirect to "DialogNavigation" view command to complete the command
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM copyright info
      • Fields inherited from interface com.ibm.commerce.tools.command.ToolsControllerCommand

        NAME
    • Constructor Summary

      Constructors 
      Constructor and Description
      CCQueueAssignCmdImpl()
      Constructor for CCQueueAssignCmdImpl
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      com.ibm.commerce.accesscontrol.AccessVector getResources()
      Gets the access vector accessed by this command.
      void performExecute()
      Contains the business logic for the command.
      void validateParameters()
      Validates the parameters expected in the request properties.
      • Methods inherited from class java.lang.Object

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

        getViewInputProperties, setRequestProperties
      • Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl

        checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, 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, 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, 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 info
        See Also:
        Constant Field Values
    • Constructor Detail

      • CCQueueAssignCmdImpl

        public CCQueueAssignCmdImpl()
        Constructor for CCQueueAssignCmdImpl
    • Method Detail

      • getResources

        public com.ibm.commerce.accesscontrol.AccessVector getResources()
                                                                 throws com.ibm.commerce.exception.ECException
        Gets the access vector accessed by this command. The default implementation returns null indicating that no protectable resource is accessed by this command. It is the responsibilities of the command writer to return the protectable primary resource(s) and the corresponding actions accessed by this command.

        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 - - if anything goes wrong with the resources being instantiated.
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECException
        Contains the business logic for the command. It uses QueueAccessBean to updates the ALLCSR field. If all CSR are allowed to access the queue, it uses QueueCSRAccessBean removes all CSR assignment from QueueCSR table otherwise, it only removes revoked CSR assignment and add newly assigned CSRs, then it redirect to "DialogNavigation" view command to complete the command
        Specified by:
        performExecute in interface com.ibm.commerce.command.ECCommand
        Overrides:
        performExecute in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECSystemException - Raised with message key : ECMessage._ERR_CREATE_EXCEPTION or ECMessage._ERR_FINDER_EXCEPTION or ECMessage._ERR_FINDER_EXCEPTION or ECMessage._ERR_NAMING_EXCEPTION or ECMessage._ERR_REMOTE_EXCEPTION if anything goes wrong with the data resources being queried.
        com.ibm.commerce.exception.ECException
      • validateParameters

        public void validateParameters()
                                throws com.ibm.commerce.exception.ECException
        Validates the parameters expected in the request properties. it also make sure queue exists in the system validated parameters are: storeId store Id (required) queueId queue Id (required) langId language id (required) allCSR allCSR setting (optional) default to "0" csrIds assigned CSR Ids separated by comma (optional)
        Specified by:
        validateParameters in interface com.ibm.commerce.command.ECCommand
        Overrides:
        validateParameters in class com.ibm.commerce.command.AbstractECTargetableCommand
        Throws:
        com.ibm.commerce.exception.ECApplicationException - Raised with message key ECMessage._ERR_BAD_MISSING_CMD_PARAMETER if fails the validation, detailed error code can be found in UIProperties.SUBMIT_ERROR_STATUS
        com.ibm.commerce.exception.ECException