public class RFQResponseAttachmentUploadCmdImpl extends AttachmentUploadCmdImpl implements RFQResponseAttachmentUploadCmd
RFQResponseAttachmentUploadCmdImpl
will upload a file
and associate the file to an RFQ.
This command uses the following AccessBeans:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field
|
defaultCommandClassName, NAME
Constructor and Description |
---|
RFQResponseAttachmentUploadCmdImpl() |
Modifier and Type | Method and Description |
---|---|
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
|
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 description. 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.
|
getAttachmentId, getAttachusg_id, setAttachusg_id, setPersistDB
getAttachmentOwner, getAttachmentStream, getErrorURL, getFileName, getFileSize, getRootPath, getUrl, setErrorURL, setRefCmd, setRootPath, setUrl
checkPermission, fulfills, getForUserId, getGeneric, getOwner, getRequestProperties, getResolvedRequestProperties, getResourceOwners, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setForUserId, setGeneric, setOwner, setResponseProperties, setRetriable, setViewInputProperties
accessControlCheck, checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, execute, getAccCheck, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getObjectSize, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, isReadyToCallExecute, reset, setAccCheck, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, setObjectSize, unionDependencies, updateCache
getCommandTarget, getCommandTargetName, getTargetPolicy, hasOutputProperties, setCommandTarget, setCommandTargetName, setHasOutputProperties, setOutputProperties, setTargetPolicy
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAttachmentId, getAttachmentOwner, getFileSize, setPersistDB
getAttachmentStream, getFileName, getUrl
checkPermission, execute, getGeneric, getRequestProperties, getResolvedRequestProperties, getResponseProperties, getRetriable, getViewInputProperties, isGeneric, isRetriable, mergeProperties, setGeneric, setRetriable, setViewInputProperties
executeFromCache, getCaller, getEntryInfo, getId, getSharingPolicy, postExecute, preExecute, setCaller, updateCache
getCommandTarget, getCommandTargetName, hasOutputProperties, setCommandTarget, setCommandTargetName, setOutputProperties
accessControlCheck, getAccCheck, getForUserId, getResourceOwners, setAccCheck, setForUserId, setOwner
checkIsAllowed, checkResourcePermission, createCommandExecutionEvent, getCommandContext, getCommandIfName, getCommandName, getCommandStoreId, getDefaultProperties, getExceptionInvokeParameters, getPostInvokeParameters, getPreInvokeParameters, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties
fulfills, getOwner
public static final java.lang.String COPYRIGHT
public java.lang.String getDescription()
public AccessVector getResources() throws ECException
getResources
in interface ECCommand
getResources
in class AbstractECTargetableCommand
ECException
public java.lang.Long getResponseId()
public java.lang.Long getRfqId()
public void performExecute() throws ECException
super.performExecute()
for uploading the attachment.
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AttachmentUploadCmdImpl
ECException
ControllerComand#performExecute
public void setDescription(java.lang.String newDescription)
newDescription
- The description to setpublic void setRequestProperties(TypedProperty reqParms) throws ECException
setRequestProperties
in interface ControllerCommand
setRequestProperties
in class AttachmentUploadCmdImpl
com.ibm.commerce.datatype.TypedProperty
- request parametersECException
ContollerCommand#setRequestProperties()
public void setResponseId(java.lang.Long newResponseId)
newResponseId
- The response Id to setpublic void setRfqId(java.lang.Long newRfqId)
newRfqId
- The rfqId to setpublic void updateDescription() throws ECException
ECException.
ECException
public void validateParameters() throws ECException
validateParameters
in interface ECCommand
validateParameters
in class UploadToStreamCmdImpl
ECException.
ECException
-
Thrown with the message ECMessage._ERR_UPLOAD_MISSING_REFCMD
when refcmd
is missing from the <instance_name>.xml
file attachment configuration section.
Thrown with the message ECMessage._ERR_UPLOAD_FILECONTENTTYPE_NOTALLOWED
when the contenttype
of the upload file does not match the file extension.
Thrown with the message ECMessage._ERR_UPLOAD_FILETYPE_NOTALLOWED
when the file type is not contained in supportedfileextension
as specified in the attachment configuration.
Thrown with the message ECMessage._ERR_UPLOAD_FILESIZE_TOOBIG
when the filesize
exceeds the maximum allowable size in the attachment configuration section of the <instance_name>.xml
file.