com.ibm.commerce.contract.commands
Class ContractNewVersionCmdImpl
com.ibm.commerce.command.AbstractECTargetableCommand
|
+--com.ibm.commerce.command.ControllerCommandImpl
|
+--com.ibm.commerce.contract.commands.ContractNewVersionCmdImpl
- All Implemented Interfaces:
- AccCommand, ContractNewVersionCmd, ControllerCommand, ECCommand, ECTargetableCommand, Protectable
- public class ContractNewVersionCmdImpl
- extends ControllerCommandImpl
- implements ContractNewVersionCmd
Create a new version of a specified contract (WebSphere Commerce
Business Edition only). The state of the specified
contract has to be in one of the following state: Approved, Active, Suspended,
DeploymentInProgress, and DeploymentFailed.
The new contract will have the same name as the specified one. If both majorVersion
and minorVersion are provided, the command respect the versions. otherwise, the new
contract will have the same major version number with the old contract, and the
minor version will be one plus the largest minor version with the same contract name,
origin, owner, majorVerion. This new contract will be in Draft version.
Method Summary |
AccessVector |
getResources()
Gets the access vector accessed by this command. |
void |
performExecute()
Contains the actual business logic of the command
It should be implemented by all the command writer. |
void |
setContractId(java.lang.Long contractId)
Set the id of the contract to create a new version. |
void |
setNewContractMajorVersion(java.lang.Integer majorVersion)
Set the major version number of the new contract. |
void |
setNewContractMinorVersion(java.lang.Integer minorVersion)
Set the minor version number of the new contract. |
void |
setRequestProperties(TypedProperty aRequestProperties)
The WebController calls this method before invoking the execute method in this command to
set the request properties for this command. |
void |
validateParameters()
Performs server side parameter checking. |
Methods inherited from class com.ibm.commerce.command.ControllerCommandImpl |
fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties |
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand |
accessControlCheck, checkIsAllowed, checkResourcePermission, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.command.ControllerCommand |
execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties |
Methods inherited from interface com.ibm.commerce.command.ECCommand |
checkIsAllowed, checkResourcePermission, getCommandContext, getCommandIfName, getCommandName, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setDefaultProperties |
CLASSNAME
public static final java.lang.String CLASSNAME
COPYRIGHT
public static final java.lang.String COPYRIGHT
ContractNewVersionCmdImpl
public ContractNewVersionCmdImpl()
getResources
public AccessVector getResources()
throws ECException
- Gets the access vector accessed by this command.
The default implementation returns null indicating that no protectable resource is
accessed by this command. It is the responsibilities of the command writer to
return the protectable primary resource(s) and the corresponding actions accessed
by this command.
- Specified by:
getResources
in interface ECCommand
- Overrides:
getResources
in class AbstractECTargetableCommand
- Returns:
- AccessVector - a vector of resource action pairs
performExecute
public void performExecute()
throws ECException
- Description copied from interface:
ECCommand
- Contains the actual business logic of the command
It should be implemented by all the command writer.
- Specified by:
performExecute
in interface ECCommand
- Overrides:
performExecute
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
com.ibm.commerce.command.CommandException
- The superclass for all ECExceptions.
setContractId
public void setContractId(java.lang.Long contractId)
- Description copied from interface:
ContractNewVersionCmd
- Set the id of the contract to create a new version.
- Specified by:
setContractId
in interface ContractNewVersionCmd
- Following copied from interface:
com.ibm.commerce.contract.commands.ContractNewVersionCmd
- Parameters:
contractId
- java.lang.Long
setNewContractMajorVersion
public void setNewContractMajorVersion(java.lang.Integer majorVersion)
- Description copied from interface:
ContractNewVersionCmd
- Set the major version number of the new contract.
- Specified by:
setNewContractMajorVersion
in interface ContractNewVersionCmd
- Following copied from interface:
com.ibm.commerce.contract.commands.ContractNewVersionCmd
- Parameters:
majorVersion
- java.lang.Integer
setNewContractMinorVersion
public void setNewContractMinorVersion(java.lang.Integer minorVersion)
- Description copied from interface:
ContractNewVersionCmd
- Set the minor version number of the new contract.
- Specified by:
setNewContractMinorVersion
in interface ContractNewVersionCmd
- Following copied from interface:
com.ibm.commerce.contract.commands.ContractNewVersionCmd
- Parameters:
minorVersion
- java.lang.Integer
setRequestProperties
public void setRequestProperties(TypedProperty aRequestProperties)
throws ECApplicationException
- Description copied from interface:
ControllerCommand
- The WebController calls this method before invoking the execute method in this command to
set the request properties for this command.
It is the responsibility of the implementer of the ControllerCommand to extract the
required input parameters from the request properties and perform parameter checking.
- Specified by:
setRequestProperties
in interface ControllerCommand
- Overrides:
setRequestProperties
in class ControllerCommandImpl
- Following copied from interface:
com.ibm.commerce.command.ControllerCommand
- Parameters:
requestProperties
- com.ibm.commerce.datatype.TypedProperty- Throws:
com.ibm.commerce.exception.ECException.
-
validateParameters
public void validateParameters()
throws ECException
- Description copied from interface:
ECCommand
- Performs server side parameter checking. This method replaces the checkParameters() method in a previous
version of the code.
- Specified by:
validateParameters
in interface ECCommand
- Overrides:
validateParameters
in class AbstractECTargetableCommand
- Following copied from interface:
com.ibm.commerce.command.ECCommand
- Throws:
ECException.
-