com.ibm.commerce.utf.commands
Class CreateContractBasicInfoCmdImpl
- java.lang.Object
-
- com.ibm.websphere.command.TargetableCommandImpl
-
- com.ibm.websphere.command.CacheableCommandImpl
-
- com.ibm.commerce.command.MeasuredCacheableCommandImpl
-
- com.ibm.commerce.command.AbstractECTargetableCommand
-
- com.ibm.commerce.command.TaskCommandImpl
-
- com.ibm.commerce.utf.commands.CreateContractBasicInfoCmdImpl
-
- All Implemented Interfaces:
- com.ibm.commerce.command.CacheableECCommand, ECCommand, ECTargetableCommand, TaskCommand, CreateContractBasicInfoCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable
public class CreateContractBasicInfoCmdImpl extends TaskCommandImpl implements CreateContractBasicInfoCmd
This is the default implementation of the CreateContractBasicInfoCmd. This command uses the following AccessBeans:- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description java.lang.Long
accountId
Account ID.java.lang.String
contractName
Contract name.java.lang.Long
contractOwner
Contract owner.static java.lang.String
COPYRIGHT
IBM copyright notice field.java.lang.Long
tradingId
Trading ID.-
Fields inherited from interface com.ibm.commerce.utf.commands.CreateContractBasicInfoCmd
defaultCommandClassName, NAME
-
-
Constructor Summary
Constructors Constructor and Description CreateContractBasicInfoCmdImpl()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.Long
getAccountId()
Retrieves the account Id.java.lang.String
getContractName()
Retrieves the name of the contract.java.lang.Long
getContractOwner()
Retrieves the ID of the contract owner.java.lang.Long
getTradingId()
Retrieves the trading agreement ID.void
performExecute()
Creates a contract using an existing trading agreement object.void
reset()
Reset the command.void
setAccountId(java.lang.Long newAccountId)
Stores the account ID.void
setContractName(java.lang.String newContractName)
Stores the incoming value for the contract name.void
setContractOwner(java.lang.Long newContractOwner)
Stores the incoming value for the contract owner ID.void
setTradingId(java.lang.Long newTradingId)
Stores the incoming value for the Trading Agreement ID.void
validateParameters()
This method does the following:
Checks if a name has been provided for the contract. Checks if a trading agreement ID has been provided. Checks if incoming trading agreement ID is valid. Checks if the supplied name is already being used by another contract in the system.-
Methods inherited from class com.ibm.commerce.command.AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, isReadyToCallExecute, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
Methods inherited from class com.ibm.websphere.command.CacheableCommandImpl
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
-
Methods inherited from class com.ibm.websphere.command.TargetableCommandImpl
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.websphere.command.CacheableCommand
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
-
Methods inherited from interface com.ibm.websphere.command.TargetableCommand
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
-
Methods inherited from interface com.ibm.commerce.command.ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getResources, getStoreId, getUser, getUserId, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
-
-
-
-
Field Detail
-
COPYRIGHT
public static final java.lang.String COPYRIGHT
IBM copyright notice field.- See Also:
- Constant Field Values
-
contractName
public java.lang.String contractName
Contract name.
-
tradingId
public java.lang.Long tradingId
Trading ID.
-
contractOwner
public java.lang.Long contractOwner
Contract owner.
-
accountId
public java.lang.Long accountId
Account ID.
-
-
Constructor Detail
-
CreateContractBasicInfoCmdImpl
public CreateContractBasicInfoCmdImpl()
Default constructor.
-
-
Method Detail
-
reset
public void reset()
Reset the command.- Specified by:
reset
in interfacecom.ibm.websphere.command.Command
- Overrides:
reset
in classAbstractECTargetableCommand
-
getAccountId
public java.lang.Long getAccountId()
Retrieves the account Id.- Returns:
- The account Id.
-
getContractName
public java.lang.String getContractName()
Retrieves the name of the contract.- Returns:
- The name of the contract.
-
getContractOwner
public java.lang.Long getContractOwner()
Retrieves the ID of the contract owner.- Returns:
- The ID of the contract owner.
-
getTradingId
public java.lang.Long getTradingId()
Retrieves the trading agreement ID.- Returns:
- The ID of the trading agreement.
-
performExecute
public void performExecute() throws ECException
Creates a contract using an existing trading agreement object.- Specified by:
performExecute
in interfaceECCommand
- Specified by:
performExecute
in interfacecom.ibm.websphere.command.TargetableCommand
- Overrides:
performExecute
in classAbstractECTargetableCommand
- Throws:
ECApplicationException
- If an error occurs while creating the contract object.ECException
- If a system error occurs prior to creating the contract.ECSystemException
- See Also:
ECCommand#performExecute()
-
setAccountId
public void setAccountId(java.lang.Long newAccountId)
Stores the account ID.- Specified by:
setAccountId
in interfaceCreateContractBasicInfoCmd
- Parameters:
newAccountId
- The account Id.
-
setContractName
public void setContractName(java.lang.String newContractName)
Stores the incoming value for the contract name.- Specified by:
setContractName
in interfaceCreateContractBasicInfoCmd
- Parameters:
newContractName
- The name of the contract.
-
setContractOwner
public void setContractOwner(java.lang.Long newContractOwner)
Stores the incoming value for the contract owner ID.- Specified by:
setContractOwner
in interfaceCreateContractBasicInfoCmd
- Parameters:
newContractOwner
- The ID of the contract owner.
-
setTradingId
public void setTradingId(java.lang.Long newTradingId)
Stores the incoming value for the Trading Agreement ID.- Specified by:
setTradingId
in interfaceCreateContractBasicInfoCmd
- Parameters:
newTradingId
- The ID of the trading agreement.
-
validateParameters
public void validateParameters() throws ECException
This method does the following:
- Checks if a name has been provided for the contract.
- Checks if a trading agreement ID has been provided.
- Checks if incoming trading agreement ID is valid.
- Checks if the supplied name is already being used by another contract in the system.
- Specified by:
validateParameters
in interfaceECCommand
- Overrides:
validateParameters
in classAbstractECTargetableCommand
- Throws:
ECApplicationException
-- If the contract name has not been provided.
- If the trading agreement ID has not been provided.
- If the trading agreement is invalid.
- If another contract with the supplied name exists.
ECSystemException
-- If any error occurs while accessing the trading agreement object.
- If any error occurs while determining if another contract with the same name exists.
ECException
- See Also:
ECCommand#validateParameters()
-
-