java.lang.Object | +--com.ibm.commerce.ubf.commands.BusinessFlowCmdImpl | +--com.ibm.commerce.contract.commands.ContractSubmitPreApprovalCmdImpl
This command will be called when a contract be submitted to approve (WebSphere Commerce Business Edition only). It will validate the specified contract. If the contract is invalid contract, an exception will be thrown. If it completes successfully, the contract will be set to Pending state. The following AccessBean is used in this default implementation: ContractFlowEntityBean
Field Summary | |
---|---|
static java.lang.String |
CLASSNAME The name of this command. |
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
Fields inherited from interface com.ibm.commerce.contract.commands. ContractSubmitPostApprovalCmd |
defaultCommandClassName,
NAME |
Constructor Summary | |
---|---|
ContractSubmitPreApprovalCmdImpl() |
Method Summary | |
---|---|
java.lang.Long |
getContractId() Returns the ID of the contract. |
java.lang.Long |
getEntityId() Returns the entity ID. |
com.ibm.commerce.ubf.beans.BusinessFlowEntityBean |
getEntityObject() Returns business flow entity bean. |
void |
performExecute() This method validates the contract and puts the contract into Pending state if the contract is a valid contract. |
void |
setContractId(java.lang.Long contractId) Sets the ID of the contract. |
void |
setRequestProperties(
TypedProperty aRequestProperties) Retrieves input parameters from the request properties. |
void |
setStateIdentifier(java.lang.Integer stateIndentifier) Sets the state identifier. |
void |
validateParameters() Validates the contract to check if it is in right state for this process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, 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. 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 |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASSNAME
Constructor Detail |
---|
public ContractSubmitPreApprovalCmdImpl()
Method Detail |
---|
public java.lang.Long getContractId()
public java.lang.Long getEntityId()
public com.ibm.commerce.ubf.beans.BusinessFlowEntityBean getEntityObject()
public void performExecute() throws ECException
performExecute
in interface
ECCommand
ECException
- Raised with message _ERR_CONTRACT_CMD_EXEC if an error occurred when the
command trys to change the state of the contract.ValidateContractCmd#performExecute()
,
AbstractECTargetableCommand.performExecute()
public void setContractId(java.lang.Long contractId)
setContractId
in interface
ContractSubmitPostApprovalCmd
contractId
- the contract IDpublic void setRequestProperties(TypedProperty aRequestProperties) throws ECApplicationException
setRequestProperties
in interface
ControllerCommand
aRequestProperties
- An TypedProperty object contains the
input parameters. For this default implementation, storeId and contractId are
the required parameters.
ECApplicationException
- Raised with message
_ERR_MISSING_CMD_PARAMETER if one of the three required parameters are missing.
Raised with message _ERR_NUMBER_FORMAT_EXCEPTION if the provided contractId,
storeId cannot be converted to Long, Integer object.ControllerCommandImpl.setRequestProperties(TypedProperty)
public void setStateIdentifier(java.lang.Integer stateIndentifier)
stateIndentifier
- the state identifierpublic void validateParameters() throws ECException
validateParameters
in interface
ECCommand
ECException
- Raised with message _ERR_WRONG_CONTRACT_STATE if the contract is not in Draft
state. Raised with message _ERR_CONTRACT_OBJECT_NOT_FOUND if the contract
cannot be found based on the provided contract id.AbstractECTargetableCommand.validateParameters()