java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.contract.commands.CopyContractCmdImpl
Copy a specified contract to a new contract (WebSphere Commerce Business Edition only). Calling commands: ContractCopyCmd, ContractNewVersionCmd The following AccessBeans are used in this default implemention: ContractAccessBean, TradingAgreementAccessBean, TradingDescriptionAccessBean, ParticipantAccessBean, AttachmentAccessBean, TradingAttachmentRelationAccessBean, ContractDisplayAccessBean, PolicyTCRelationAccessBean, TermConditionDescriptionAccessBean, TermConditionAccessBean.
Field Summary | |
---|---|
static java.lang.String |
CLASSNAME The name of this class. |
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.contract.commands. CopyContractCmd |
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
CopyContractCmdImpl() |
Method Summary | |
---|---|
void |
createNewContract() Creates a new contract based on an existing contract. |
void |
createNewVersionInContractChildTable() Copys other contract related data for the new contract based on the existing contract. |
void |
createNewVersionInTCChildTable(java.lang.Long newTCId,
java.lang.Long originalTCId) Copys terms and conditions related data for the new contract based on the existing contract. |
java.lang.Long |
getNewContractId() Returns ID of the new contract. |
void |
performExecute() The method creates the account based on the account Element object. |
void |
setContractId(java.lang.Long anContractId) Sets ID of the contract which will be copied from. |
void |
setContractMajorVersion(java.lang.Integer majorVersion) Sets the major version of the new contract. |
void |
setContractMinorVersion(java.lang.Integer minorVersion) Sets the minor version of the new contract. |
void |
setContractName(java.lang.String contractName) Sets the name of the new contract. |
void |
validateParameters() Validates if the id of the original contract was provided. |
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,
reset,
setAccCheck,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
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
public static final java.lang.String CLASSNAME
Constructor Detail |
---|
public CopyContractCmdImpl()
Method Detail |
---|
public void createNewContract() throws javax.ejb.CreateException, javax.ejb.FinderException, java.rmi.RemoteException, javax.naming.NamingException, java.sql.SQLException
CreateException
FinderException
java.rmi.RemoteException
javax.naming.NamingException
java.sql.SQLException
public void createNewVersionInContractChildTable() throws javax.ejb.CreateException, javax.ejb.FinderException, java.rmi.RemoteException, javax.naming.NamingException
CreateException
FinderException
java.rmi.RemoteException
javax.naming.NamingException
public void createNewVersionInTCChildTable(java.lang.Long newTCId, java.lang.Long originalTCId) throws javax.ejb.CreateException, javax.ejb.FinderException, java.rmi.RemoteException, javax.naming.NamingException
newTCId
- the ID of the new termoriginalTCId
- the ID of the original termCreateException
FinderException
java.rmi.RemoteException
javax.naming.NamingException
public java.lang.Long getNewContractId()
getNewContractId
in interface
CopyContractCmd
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECException
- Raised with message _ERR_CONTRACT_COPY whenever an IOException or
SAXException occurred during terms and conditions copying process.createNewContract()
,
createNewVersionInContractChildTable()
,
CopyContractCmdImpl#createNewVersionInTCChildTable(newTCId,
orgTCId)
,
AbstractECTargetableCommand.performExecute()
public void setContractId(java.lang.Long anContractId)
setContractId
in interface
CopyContractCmd
anContractId
- the ID of the original
contractpublic void setContractMajorVersion(java.lang.Integer majorVersion)
setContractMajorVersion
in interface
CopyContractCmd
majorVersion
- the major version of the new
contractpublic void setContractMinorVersion(java.lang.Integer minorVersion)
setContractMinorVersion
in interface
CopyContractCmd
minorVersion
- the minor version of the new
contractpublic void setContractName(java.lang.String contractName)
setContractName
in interface
CopyContractCmd
contractName
- the name of the new
contractpublic void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECException
- Raised with the message _ERR_MISSING_CONTRACT_ID if the id of the original
contract was missing.AbstractECTargetableCommand.validateParameters()