com.ibm.commerce.approval.commands
Class SetApprovalsDetailsViewCmdImpl
java.lang.Object
CacheableCommandImpl
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:
- AccCommand, ControllerCommand, ECCommand, ECTargetableCommand, Protectable, SetApprovalsDetailsViewCmd, ToolsControllerCommand
- public class SetApprovalsDetailsViewCmdImpl
- extends 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 AccessBeans:
- See Also:
- Serialized Form
Field Summary |
java.lang.Long |
aprvId
Approval status id. |
static java.lang.String |
COPYRIGHT
IBM copyright notice field. |
Method Summary |
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(TypedProperty reqParms)
Sets the request parameters. |
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, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties |
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 |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM copyright notice field.
- See Also:
- Constant Field Values
aprvId
public java.lang.Long aprvId
- Approval status id.
SetApprovalsDetailsViewCmdImpl
public SetApprovalsDetailsViewCmdImpl()
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 ECSystemException
- Determine the view and the name of the parameter in which to pass the entity id.
Retrieve the APRVSTATUS record corresponding to the request to obtain the entityIid and the flowTypeId then retrieve the flowtype record to obtain the viewname and parameter name.
If the viewname 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 ECCommand
- Overrides:
- performExecute in class AbstractECTargetableCommand
-
- Throws:
- 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 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(TypedProperty reqParms)
throws ECApplicationException
- Sets the request parameters.
-
- Specified by:
- setRequestProperties in interface ControllerCommand
- Overrides:
- setRequestProperties in class ToolsControllerCommandImpl
-
- Parameters:
- reqParms - The TypedProperty containing the request parameters.
- Throws:
- ECApplicationException - if:
- An approval request id is not specified or is not a valid Long.
Feedback
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.