com.ibm.commerce.rfq.commands
Class CreateTradeAttachmentCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.TaskCommandImpl
                    |
                    +--com.ibm.commerce.rfq.commands.CreateTradeAttachmentCmdImpl
All Implemented Interfaces:
CreateTradeAttachmentCmd, ECCommand, ECTargetableCommand, TaskCommand

public class CreateTradeAttachmentCmdImpl
extends TaskCommandImpl
implements CreateTradeAttachmentCmd

Implementation for associating an attachment object to a trading object.

This is the default implementation of the CreateTradeAttachmentCmd. This command calls the following TaskCommands:

This command uses the following AccessBeans/DataBeans:
See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          COPYRIGHT
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.rfq.commands. CreateTradeAttachmentCmd
defaultCommandClassName, NAME
 
Fields inherited from interface com.ibm.commerce.command. ECCommand
defaultCommandClassName
 
Constructor Summary
CreateTradeAttachmentCmdImpl()
          Constructs a new TradeAttachmentCreateCmdImpl class instance.
 
Method Summary
 java.lang.Long getAttachmentId()
          Gets the attachmentId
 java.lang.Long getTradingId()
          Gets the tradingId
 void performExecute()
          Create the association between the attachment and the trading agreement.
 void reset()
          Reset the command
 void setAttachmentId(java.lang.Long attachmentId)
          Sets the attachmentId
 void setTradingId(java.lang.Long tradingId)
          Sets the tradingId
 void validateParameters()
          Checks if the tradingId and attachmentId have been set, check if trading agreement exist, and if attachment exist.
 
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 static final java.lang.String COPYRIGHT
COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

CreateTradeAttachmentCmdImpl

public CreateTradeAttachmentCmdImpl()
Constructs a new TradeAttachmentCreateCmdImpl class instance.
Method Detail

reset

public void reset()
Reset the command
Overrides:
reset in class AbstractECTargetableCommand

performExecute

public void performExecute()
                    throws ECException
Create the association between the attachment and the trading agreement.
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AbstractECTargetableCommand
Throws:
ECException.
ECException
See Also:
ECCommand.performExecute()

validateParameters

public void validateParameters()
                        throws ECException
Checks if the tradingId and attachmentId have been set, check if trading agreement exist, and if attachment exist.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class AbstractECTargetableCommand
Throws:
ECException.
ECException
See Also:
ECCommand.validateParameters()

getAttachmentId

public java.lang.Long getAttachmentId()
Gets the attachmentId
Returns:
Returns a Long

setAttachmentId

public void setAttachmentId(java.lang.Long attachmentId)
Sets the attachmentId
Specified by:
setAttachmentId in interface CreateTradeAttachmentCmd
Parameters:
attachmentId - The attachmentId to set

getTradingId

public java.lang.Long getTradingId()
Gets the tradingId
Returns:
Returns a Long

setTradingId

public void setTradingId(java.lang.Long tradingId)
Sets the tradingId
Specified by:
setTradingId in interface CreateTradeAttachmentCmd
Parameters:
tradingId - The tradingId to set