com.ibm.commerce.rfq.commands
Class RFQResponseAttachmentUploadCmdImpl
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.RFQResponseAttachmentUploadCmdImpl
- All Implemented Interfaces:
-
AccCommand,
AttachmentUploadCmd,
ControllerCommand,
ECCommand,
ECTargetableCommand,
RFQResponseAttachmentUploadCmd,
UploadToStreamCmd
- public class RFQResponseAttachmentUploadCmdImpl
- extends
AttachmentUploadCmdImpl
- implements
RFQResponseAttachmentUploadCmd
The RFQResponseAttachmentUploadCmdImpl
will upload a file and
associate the file to an RFQ.
This command uses the following AccessBeans:
- See Also:
- Serialized
Form
Field Summary |
static java.lang.String |
COPYRIGHT
IBM copyright notice field |
Method Summary |
java.lang.String |
getDescription()
Gets the description |
AccessVector |
getResources()
Gets the access vector accessed by this command. |
java.lang.Long |
getResponseId()
Gets the responseId |
java.lang.Long |
getRfqId()
Gets the rfqId |
protected
void |
handleError(
ECException e)
This method constructs and returns the error message. |
void |
performExecute()
Save the attachment to datastore. |
void |
setDescription(java.lang.String newDescription)
Sets the description |
void |
setRequestProperties(
TypedProperty reqParms)
Calls super.setRequestProperties to retrieve 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 |
setResponseId(java.lang.Long newResponseId)
Sets the responseId |
void |
setRfqId(java.lang.Long newRfqId)
Sets the rfqId |
void |
updateDescription()
Update the description of the attachment. |
void |
validateParameters()
Checks if the RFQ id has been set, and if specified RFQ
exist. |
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.command.
ControllerCommand |
checkPermission,
execute,
getGeneric,
getRequestProperties,
getResolvedRequestProperties,
getResponseProperties,
getRetriable,
getViewInputProperties,
isGeneric,
isRetriable,
mergeProperties,
setGeneric,
setRetriable,
setViewInputProperties |
Methods inherited from interface
com.ibm.commerce.command.
ECCommand |
checkIsAllowed,
checkResourcePermission,
createCommandExecutionEvent,
getCommandContext,
getCommandIfName,
getCommandName,
getCommandStoreId,
getDefaultProperties,
getStoreId,
getUser,
getUserId,
setCommandContext,
setCommandIfName,
setCommandStoreId,
setDefaultProperties |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM copyright notice field
- See Also:
-
Constant Field Values
RFQResponseAttachmentUploadCmdImpl
public RFQResponseAttachmentUploadCmdImpl()
getDescription
public java.lang.String getDescription()
- Gets the description
-
- Returns:
- Returns a String
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
getResponseId
public java.lang.Long getResponseId()
- Gets the responseId
-
- Returns:
- Returns a Long
getRfqId
public java.lang.Long getRfqId()
- Gets the rfqId
-
- Returns:
- Returns a Long
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
public void performExecute()
throws ECException
- Save the attachment to datastore. Calls
super.performExecute()
for uploading the attachment.
-
- Specified by:
-
performExecute
in interface
ECCommand
- Overrides:
-
performExecute
in class
AttachmentUploadCmdImpl
-
- Throws:
-
ECException
setDescription
public void setDescription(java.lang.String newDescription)
- Sets the description
-
- Parameters:
newDescription
- The description to set
setRequestProperties
public void setRequestProperties(TypedProperty reqParms)
throws ECException
- Calls super.setRequestProperties to retrieve 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
setResponseId
public void setResponseId(java.lang.Long newResponseId)
- Sets the responseId
-
- Parameters:
newResponseId
- The response Id to set
setRfqId
public void setRfqId(java.lang.Long newRfqId)
- Sets the rfqId
-
- Parameters:
newRfqId
- The rfqId to set
updateDescription
public void updateDescription()
throws ECException
- Update the description of the attachment.
-
- Throws:
ECException.
-
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