com.ibm.commerce.rfq.commands
Class RFQResponsePattributeAttachmentAddCmdImpl

java.lang.Object
  |
  +--CacheableCommandImpl
        |
        +--com.ibm.commerce.command.AbstractECTargetableCommand
              |
              +--com.ibm.commerce.command.ControllerCommandImpl
                    |
                    +--com.ibm.commerce.command.UploadToStreamCmdImpl
                          |
                          +--com.ibm.commerce.command.AttachmentUploadCmdImpl
                                |
                                +--com.ibm.commerce.rfq.commands.RFQResponsePattributeAttachmentAddCmdImpl
All Implemented Interfaces:
AccCommand, AttachmentUploadCmd, ControllerCommand, ECCommand, ECTargetableCommand, RFQResponsePattributeAttachmentAddCmd, UploadToStreamCmd

public class RFQResponsePattributeAttachmentAddCmdImpl
extends AttachmentUploadCmdImpl
implements RFQResponsePattributeAttachmentAddCmd

The RFQResponsePattributeAttachmentAddCmdImpl will upload a file and associate the file to an RFQ response product personalization attribute.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.ibm.commerce.command. UploadToStreamCmdImpl
COPYRIGHT
 
Fields inherited from class com.ibm.commerce.command. ControllerCommandImpl
requestProperties, responseProperties, retriable, viewReqProperties
 
Fields inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
commandContext
 
Fields inherited from interface com.ibm.commerce.rfq.commands. RFQResponsePattributeAttachmentAddCmd
COPYRIGHT, defaultCommandClassName, NAME
 
Constructor Summary
RFQResponsePattributeAttachmentAddCmdImpl()
           
 
Method Summary
  AccessVector getResources()
          Gets the access vector accessed by this command.
protected  void handleError( ECException e)
          This method constructs and returns the error message.
 void performExecute()
          Save the attachment to datastore, and associate the attachment to a RFQ.
 void setRequestProperties( TypedProperty reqParms)           Calls super.setRequestProperties to retrieve the rfq Id and the attach file content. After this, retrieve that attachment descrition. The WebController calls the setRequestProperties method before invoking the execute method in this command.
 void validateParameters()
          Checks if the RFQ id has been set, and if specified RFQ exist.
 
Methods inherited from class com.ibm.commerce.command. AttachmentUploadCmdImpl
getAttachmentId, getAttachusg_id, setAttachusg_id, setPersistDB
 
Methods inherited from class com.ibm.commerce.command. UploadToStreamCmdImpl
getAttachmentOwner, getAttachmentStream, getContentType, getErrorURL, getFileExtension, getFileName_NoExt, getFileName, getFileSize, getRootPath, getStoreName, getUrl, setErrorURL, setRefCmd, setRootPath, setUrl
 
Methods inherited from class com.ibm.commerce.command. ControllerCommandImpl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
 
Methods inherited from class com.ibm.commerce.command. AbstractECTargetableCommand
accessControlCheck, checkIsAllowed, checkParameters, checkResourcePermission, createCommandExecutionEvent, execute, finalize, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, 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
 
Methods inherited from interface com.ibm.commerce.rfq.commands. RFQResponsePattributeAttachmentAddCmd
getAttachmentOwner, getFileSize
 
Methods inherited from interface com.ibm.commerce.command. AttachmentUploadCmd
getAttachmentId, setPersistDB
 
Methods inherited from interface com.ibm.commerce.command. UploadToStreamCmd
getAttachmentStream, getFileName, getUrl
 
Methods inherited from interface com.ibm.commerce.command. ControllerCommand
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
 
Methods inherited from interface com.ibm.commerce.command. AccCommand
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
 
Methods inherited from interface com.ibm.commerce.command. ECCommand
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
 

Constructor Detail

RFQResponsePattributeAttachmentAddCmdImpl

public RFQResponsePattributeAttachmentAddCmdImpl()
Method Detail

handleError

protected void handleError(ECException e)
                    throws ECApplicationException
This method constructs and returns the error message.
Parameters:
e - The exception object.
Throws:
com.ibm.commerce.exception.ECApplicationException. - Throw ECApplicationException with the newly constructed message.
ECApplicationException

setRequestProperties

public void setRequestProperties(TypedProperty reqParms)
                          throws ECException
Calls super.setRequestProperties to retrieve the rfq Id and the attach file content. After this, retrieve that attachment descrition. The WebController calls the setRequestProperties method before invoking the execute method in this command.
Specified by:
setRequestProperties in interface ControllerCommand
Overrides:
setRequestProperties in class AttachmentUploadCmdImpl
Parameters:
reqParms - request properties
Throws:
ECException

performExecute

public void performExecute()
                    throws ECException
Save the attachment to datastore, and associate the attachment to a RFQ. Calls super.performExecute() for saving Calls TradeAttachmentCreateCmd.execute() for creating the association
Specified by:
performExecute in interface ECCommand
Overrides:
performExecute in class AttachmentUploadCmdImpl
Throws:
ECException

validateParameters

public void validateParameters()
                        throws ECException
Checks if the RFQ id has been set, and if specified RFQ exist.
Specified by:
validateParameters in interface ECCommand
Overrides:
validateParameters in class UploadToStreamCmdImpl
Throws:
ECException.
ECException

getResources

public AccessVector getResources()
                          throws ECException
Gets the access vector accessed by this command.
Specified by:
getResources in interface ECCommand
Overrides:
getResources in class AbstractECTargetableCommand
Returns:
AccessVector - a vector of resource action pairs
Throws:
ECException