public class ContractNewVersionCmdImpl extends com.ibm.commerce.command.ControllerCommandImpl implements ContractNewVersionCmd
ContractNewVersionCmd
controller command.
Name | Description |
---|---|
contractId |
The contract ID. It is mandatory. |
majorVersion |
The major version of a contract. It is mandatory. |
minorVersion |
The minor version of a contract.It is mandatory. |
ContractAccessBean
MemberAccessBean
CopyContractCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASSNAME
The full name of this class.
|
static java.lang.String |
COPYRIGHT
The IBM copyright notice field.
|
defaultCommandClassName, NAME
Constructor and Description |
---|
ContractNewVersionCmdImpl() |
Modifier and Type | Method and Description |
---|---|
com.ibm.commerce.accesscontrol.AccessVector |
getResources()
Gets the access vector accessed by this command.
|
void |
performExecute()
Executes the business logic of this command implementation.
|
void |
setContractId(java.lang.Long contractId)
Sets the ID of the contract to be copied from.
|
void |
setNewContractMajorVersion(java.lang.Integer majorVersion)
Sets the major version number of the new contract.
|
void |
setNewContractMinorVersion(java.lang.Integer minorVersion)
Sets the minor version number of the new contract.
|
void |
setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties)
Sets the request properties of this command implementation.
|
void |
validateParameters()
Extracts and validates the input parameters of this command implementation.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
public static final java.lang.String CLASSNAME
public static final java.lang.String COPYRIGHT
public com.ibm.commerce.accesscontrol.AccessVector getResources() throws com.ibm.commerce.exception.ECException
getResources
in interface com.ibm.commerce.command.ECCommand
getResources
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
AbstractECTargetableCommand.getResources()
public void performExecute() throws com.ibm.commerce.exception.ECException
performExecute
in interface com.ibm.commerce.command.ECCommand
performExecute
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
- Raised with message _ERR_CONTRACT_CMD_EXEC whenever the error occurs in CopyContractCmd. see that command for detailCopyContractCmdImpl.performExecute()
,
AbstractECTargetableCommand#performExecute()
public void setContractId(java.lang.Long contractId)
setContractId
in interface ContractNewVersionCmd
contractId
- the ID of the contract to be copied frompublic void setNewContractMajorVersion(java.lang.Integer majorVersion)
setNewContractMajorVersion
in interface ContractNewVersionCmd
majorVersion
- the major version number of the new contractpublic void setNewContractMinorVersion(java.lang.Integer minorVersion)
setNewContractMinorVersion
in interface ContractNewVersionCmd
minorVersion
- the minor version number of the new contractpublic void setRequestProperties(com.ibm.commerce.datatype.TypedProperty aRequestProperties) throws com.ibm.commerce.exception.ECApplicationException
setRequestProperties
in interface com.ibm.commerce.command.ControllerCommand
setRequestProperties
in class com.ibm.commerce.command.ControllerCommandImpl
aRequestProperties
- An TypedProperty object contains the input parameters.
For this default implementation, contractId, and URL parameters are required.com.ibm.commerce.exception.ECApplicationException
- Raised with message _ERR_MISSING_CMD_PARAMETER when one of the three parameters, contractId or URL, is missed from the URL.
Raised with message _ERR_NUMBER_FORMAT_EXCEPTION if the provided contractId parameter cannot be converted to Long object. It occurs too
if majorVersion, minorVersion parameter cannot be converted to Integer object.ControllerCommandImpl.setRequestProperties(TypedProperty)
public void validateParameters() throws com.ibm.commerce.exception.ECException
validateParameters
in interface com.ibm.commerce.command.ECCommand
validateParameters
in class com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.exception.ECException
- Raised with message _ERR_WRONG_CONTRACT_STATE if the contract is in one of the following
states: Draft, Pending, Rejected, Closed, Canceled
Raised with message _ERR_CONTRACT_OBJECT_NOT_FOUND if the contract cannot be found. It is based on the provided contract ID.
Raised with message _ERR_CONTRACT_VERSIONS if the provided version of the contract already exists.
Raised with message _ERR_CONTRACT_SYS_GENERIC if the AccessBeans used in this method throw one of the following exceptions: CreateException, NamingException,
RemoteException, FinderException.AbstractECTargetableCommand#validateParameters()