public class RFQAttachmentUploadCmdImpl extends AttachmentUploadCmdImpl implements RFQAttachmentUploadCmd
The RFQAttachmentUploadCmdImpl
will upload a file
and associate the file to an RFQ.
This is the default implementation of the RFQAttachmentUploadCmd Command.
This command calls the following TaskCommands:
defaultCommandClassName, NAME
Constructor and Description |
---|
RFQAttachmentUploadCmdImpl() |
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 |
gettradingId()
Gets the tradingId
|
void |
performExecute()
Save the attachment to datastore, and associate the attachment to an RFQ.
|
void |
reset()
Reset the command
|
void |
setDescription(java.lang.String description)
Sets the description
|
void |
setRequestProperties(TypedProperty reqParms)
Calls super.setRequestProperties to retrieve the rfq Id and 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 |
settradingId(java.lang.Long tradingId)
Sets the tradingId
|
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, 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
getAttachmentOwner, getFileSize
getAttachmentId, 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 void reset()
reset
in interface com.ibm.websphere.command.Command
reset
in class AbstractECTargetableCommand
public AccessVector getResources() throws ECException
getResources
in interface ECCommand
getResources
in class AbstractECTargetableCommand
ECException
ECCommand#getResources()
public void setRequestProperties(TypedProperty reqParms) throws ECException
setRequestProperties
in interface ControllerCommand
setRequestProperties
in class AttachmentUploadCmdImpl
com.ibm.commerce.datatype.TypedProperty
- request parametersECException
ControllerCmd#setRequestProperties(TypedProperty)
public void performExecute() throws ECException
super.performExecute()
for saving
Calls TradeAttachmentCreateCmd.execute()
for creating the association
performExecute
in interface ECCommand
performExecute
in interface com.ibm.websphere.command.TargetableCommand
performExecute
in class AttachmentUploadCmdImpl
ECException
ECCommand#performExecute()
public java.lang.Long gettradingId()
public void settradingId(java.lang.Long tradingId)
tradingId
- The tradingId to setpublic 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.
ECCommand#validateParameters()
public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- The description to set