com.ibm.commerce.approval.commands

Class SetApprovalsDetailsViewCmdImpl

  • 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.approval.commands.SetApprovalsDetailsViewCmdImpl
  • All Implemented Interfaces:
    SetApprovalsDetailsViewCmd, 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 SetApprovalsDetailsViewCmdImpl
    extends com.ibm.commerce.tools.command.ToolsControllerCommandImpl
    implements SetApprovalsDetailsViewCmd
    Sets the appropriate summary view.

    The command is invoked when a user clicks the "Summary" button while viewing a list of approvals. The selected approval request id is supplied as a parameter to this command. The command will retrieve the entityId corresponding to the approval request. This entityId will be passed to the view as the ID parameter.

    The view will depend on the flow type associated with the approval request and will be obtained from the VIEWNAME column of the FLOWTYPE table. If the viewname is null, it will be set to ApprovalConstants.EC_NO_SUMMARY_VIEW.

    The name of the parameter which will be used to pass the entity id to the view can be customized. The attribute of the FLOWTYPE is a string consisting of name/values pairs. If this string contains an idName, the value of idName will be used as the parameter to the view. If this string does not contain an idName, the parameter to the view will be the value of ApprovalConstants.EC_SET_DETAIL_ID.

    This command uses the following Access Beans:

    • ApprovalStatusAccessBean
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long getAprvId()
      Gets the approval status ID to be acted on.
      void performExecute()
      Determine the view and the name of the parameter in which to pass the entity id.
      void reset()
      Reset the command for next use.
      void setAprvId(java.lang.Long newAprvId)
      Sets the approval request ID.
      void setRequestProperties(com.ibm.commerce.datatype.TypedProperty reqParms)
      Sets the request parameters.
      • 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
      • 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, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
      • 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, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters
      • Methods inherited from interface com.ibm.commerce.security.Protectable

        fulfills, getOwner
    • Field Detail

      • aprvId

        public java.lang.Long aprvId
        Approval status id.
      • COPYRIGHT

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

      • SetApprovalsDetailsViewCmdImpl

        public SetApprovalsDetailsViewCmdImpl()
    • Method Detail

      • getAprvId

        public java.lang.Long getAprvId()
        Gets the approval status ID to be acted on.
        Specified by:
        getAprvId in interface SetApprovalsDetailsViewCmd
        Returns:
        java.lang.Long The approver ID.
      • performExecute

        public void performExecute()
                            throws com.ibm.commerce.exception.ECSystemException
        Determine the view and the name of the parameter in which to pass the entity id.

        Retrieves the APRVSTATUS record corresponding to the request to obtain the entityIid and the flowTypeId. Subsequently retrieves the flowtype record to obtain the view name and parameter name.

        If the view name is null, it will set the view to ApprovalConstants.EC_NO_SUMMARY_VIEW.

        The parameter name is obtained from the flowtype attribute. The attribute is a string consisting of name/value pairs. The idName field will contain the parameter name. If the attribute does not contain an idName, the value of ApprovalConstants.EC_SET_DETAIL_ID will be used as the parameter.

        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 - if a CreateExeception, FinderException, RemoteException or NamingException is thrown by any of the AccessBeans.
      • reset

        public void reset()
        Reset the command for next use.
        Overrides:
        reset in class com.ibm.commerce.command.AbstractECTargetableCommand
      • setAprvId

        public void setAprvId(java.lang.Long newAprvId)
        Sets the approval request ID.
        Specified by:
        setAprvId in interface SetApprovalsDetailsViewCmd
        Parameters:
        newAprvId - The approval request ID.
      • setRequestProperties

        public void setRequestProperties(com.ibm.commerce.datatype.TypedProperty reqParms)
                                  throws com.ibm.commerce.exception.ECApplicationException
        Sets the request parameters.
        Specified by:
        setRequestProperties in interface com.ibm.commerce.command.ControllerCommand
        Overrides:
        setRequestProperties in class com.ibm.commerce.tools.command.ToolsControllerCommandImpl
        Parameters:
        reqParms - The TypedProperty containing the request parameters.
        Throws:
        com.ibm.commerce.exception.ECApplicationException - if:
        • An approval request id is not specified or is not a valid Long.