java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.approval.commands.ApprovalCheckApproverForEntityCmdImpl
This task commadn checks whether a user is an approver for a particular submission.
Before executing this task command, the following sets should be performed:
Upon completion of the command, the following should be called to retrieve boolean result
Behaviour
This command will check if there is an approval record for the given approver id and entity (flowtype + BusinessEntityId).
This command uses the following AccessBeans:
ApprovalStatusAccessBean
Field Summary | |
---|---|
protected
java.lang.Long |
approverId Approver id |
protected
java.lang.Long |
businessEntityId Entity id |
protected
java.lang.String |
businessFlowTypeIdentifier Flow type identifier |
protected
boolean |
canApprove Whether or not the user can approve |
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.approval.commands. ApprovalCheckApproverForEntityCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
ApprovalCheckApproverForEntityCmdImpl() Default constructor |
Method Summary | |
---|---|
boolean |
isApprover() Returns whether or not the user is an approver for this submission. |
boolean |
isReadyToCallExecute() Check if the command is ready to be executed. |
void |
performExecute() The main logic. |
void |
setApproverId(java.lang.Long newApproverId) Sets the ID of a user to check to see if approver of entity. |
void |
setBusinessEntityId(java.lang.Long newBusinessEntityId) Sets the ID of the business entity object for which the approval is being requested. |
void |
setBusinessFlowTypeIdentifier(java.lang.String newBusinessFlowTypeIdentifier) Sets the identifier of the type of business flow for the approvable action. |
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,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties,
validateParameters |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
protected boolean canApprove
protected java.lang.Long approverId
protected java.lang.String businessFlowTypeIdentifier
protected java.lang.Long businessEntityId
Constructor Detail |
---|
public ApprovalCheckApproverForEntityCmdImpl()
Method Detail |
---|
public boolean isApprover()
isApprover
in interface
ApprovalCheckApproverForEntityCmd
public boolean isReadyToCallExecute()
isReadyToCallExecute
in class
AbstractECTargetableCommand
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException.
ECException
public void setApproverId(java.lang.Long newApproverId)
setApproverId
in interface
ApprovalCheckApproverForEntityCmd
newApproverId
- A user idpublic void setBusinessEntityId(java.lang.Long newBusinessEntityId)
setBusinessEntityId
in interface
ApprovalCheckApproverForEntityCmd
newBusinessEntityId
- The entity on which the approval is
being requestedpublic void setBusinessFlowTypeIdentifier(java.lang.String newBusinessFlowTypeIdentifier)
setBusinessFlowTypeIdentifier
in interface
ApprovalCheckApproverForEntityCmd
newBusinessFlowTypeIdentifier
- The type of flow for this
approval