java.lang.Object | +--CacheableCommandImpl | +--com.ibm.commerce.command.AbstractECTargetableCommand | +--com.ibm.commerce.command.TaskCommandImpl | +--com.ibm.commerce.utf.commands.CreateOrderCommentsTCCmdImpl
Creates terms and conditions of type "OrderComments".
This command can be used to convert freeform terms and conditions input during the course of a negotiation into Terms and Conditions associated with a trading agreement. When an order results from a trading agreement, the OrderComment TCs will appear customer as comments in the prepared order.
Behaviour
The command loops through the list of freeform comments and does the following for each comment:
Exception conditions
Field Summary | |
---|---|
java.util.Vector |
commentsVector Comments Vector. |
java.lang.Long |
tradingId Trading Id. |
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand |
commandContext |
Fields inherited from interface com.ibm.commerce.utf.commands. CreateOrderCommentsTCCmd |
COPYRIGHT,
defaultCommandClassName,
NAME |
Fields inherited from interface com.ibm.commerce.command. ECTargetableCommand |
COPYRIGHT |
Fields inherited from interface com.ibm.commerce.command. ECCommand |
defaultCommandClassName |
Constructor Summary | |
---|---|
CreateOrderCommentsTCCmdImpl() Default Constructor. |
Method Summary | |
---|---|
java.util.Vector |
getCommentsVector() Retrieves a vector of freeform comments. |
java.lang.Long |
getTradingId() Retrieves the trading agreement ID. |
void |
performExecute() Creates one OrderComment TC for every incoming freeform comment. |
void |
reset() Reset the command. |
void |
setCommentsVector(java.util.Vector newCommentsVector) Stores the list of freeform comments that need to be converted into TCs. |
void |
setTradingId(java.lang.Long newTradingId) Stores the incoming trading agreement ID. |
void |
validateParameters()
This method does the following:
Verifies that a comment list has been provided. Verifies that a trading
agreement ID has been provided. Verifies that the provided trading agreement ID
exists. |
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,
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 java.lang.Long tradingId
public java.util.Vector commentsVector
Constructor Detail |
---|
public CreateOrderCommentsTCCmdImpl()
Method Detail |
---|
public void reset()
reset
in class
AbstractECTargetableCommand
public java.util.Vector getCommentsVector()
public java.lang.Long getTradingId()
public void performExecute() throws ECException
performExecute
in interface
ECCommand
performExecute
in class
AbstractECTargetableCommand
ECApplicationException
- If an application error occurs while
creating the TC.
ECSystemException
- If a system error occurs while creating the
TC.ECException
ECCommand#performExecute()
public void setCommentsVector(java.util.Vector newCommentsVector)
setCommentsVector
in interface
CreateOrderCommentsTCCmd
newCommentsVector
- The list of freeform
comments.public void setTradingId(java.lang.Long newTradingId)
setTradingId
in interface
CreateOrderCommentsTCCmd
newTradingId
- The ID of the trading
agreement.public void validateParameters() throws ECException
validateParameters
in interface
ECCommand
validateParameters
in class
AbstractECTargetableCommand
ECApplicationException
-
ECException
ECCommand#validateParameters()