java.lang.ObjectCacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.ControllerCommandImpl
com.ibm.commerce.tools.command.ToolsControllerCommandImpl
com.ibm.commerce.approval.commands.HandleApprovalsCmdImpl
Processes approvals or rejections. The approver may either approve or reject one or more approval requests. The approver may supply an optional comment which will be stored in the approval request's record in the APRVSTATUS table. This comment can be viewed by the request submitter.
Behaviour
This command will raise a business flow event to handle each approval or rejection. The business flow event will handle the updating of the APRVSTATUS table as well as any other activities which have been defined for this transition. The status of the approval requests record in the APRVSTATUS table will be updated to 1 for approved or 2 for rejected.
The command treats each approval or rejection as a separate transaction so it is possible that if command is invoked to process a batch of approvals or rejections, some may succeed and others may fail.
The command will set the resultMsg for the view it sets to indicate the success or failure of the processing. The value of resultmsg will be the appropriate key into the approvalsNLS properties file for the message to be displayed by the JSP.
This command uses the following AccessBeans:
Field Summary | |
protected java.lang.Integer | aprvAct Approval action. |
protected java.lang.String | aprvIds .Approval Status id. |
protected java.lang.String | comments comments. |
static java.lang.String | COPYRIGHT IBM copyright notice field. |
protected java.lang.String | viewTask View task. |
Fields inherited from class com.ibm.commerce.command.ControllerCommandImpl |
requestProperties, responseProperties, retriable, viewReqProperties |
Fields inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.approval.commands.HandleApprovalsCmd |
defaultCommandClassName, NAME |
Constructor Summary | |
HandleApprovalsCmdImpl() |
Method Summary | |
java.lang.Integer | getAprvAct() Gets the action. |
java.lang.String | getAprvIds() Gets the list of approval status IDs to be acted on. |
java.lang.String | getComments() Gets the comments |
TypedProperty | getViewInputProperties() This method is called by the Web controller to retrieve the request properties set by the setRequestProperties() method. |
java.lang.String | getViewTask() Gets the view task name. |
void | performExecute() Processes the approval or rejection. |
void | reset() Reset the command so that it can be invoked again. |
void | setAprvAct(java.lang.Integer newAprvAct) Gets the action. |
void | setAprvIds(java.lang.String newAprvIds) Sets the list of approval status IDs to be acted on. |
void | setComments(java.lang.String newComments) Sets the comments. |
void | setRequestProperties(TypedProperty reqParms) Sets the request parameters. |
void | setViewTask(java.lang.String newViewTask) Sets the view task name. |
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, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, 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, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties, validateParameters |
Methods inherited from interface com.ibm.commerce.security.Protectable |
fulfills, getOwner |
Field Detail |
public static final java.lang.String COPYRIGHT
protected java.lang.String aprvIds
protected java.lang.Integer aprvAct
protected java.lang.String viewTask
protected java.lang.String comments
Constructor Detail |
public HandleApprovalsCmdImpl()
Method Detail |
public java.lang.Integer getAprvAct()
public java.lang.String getAprvIds()
public java.lang.String getComments()
public java.lang.String getViewTask()
public TypedProperty getViewInputProperties()
public void performExecute() throws ECSystemException
After setting some return messages based on the action,this method will loop through the approval requests to be processed. For each request to be processed, it will:
After all approval requests have been processed, it will use the success and failure counts to determine which message to return to the JSP.
public void reset()
public void setAprvAct(java.lang.Integer newAprvAct)
public void setAprvIds(java.lang.String newAprvIds)
public void setComments(java.lang.String newComments)
public void setRequestProperties(TypedProperty reqParms) throws ECApplicationException
public void setViewTask(java.lang.String newViewTask)
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.