public class RFQAttachmentReplaceCmdImpl extends AttachmentUploadCmdImpl implements RFQAttachmentReplaceCmd
The RFQAttachmentReplaceCmdImpl
will remove the specified attachment
from an RFQ, then upload a file and associate the file to an RFQ.
This is the default implementation of the RFQAttachmentReplaceCmd Command. This command calls the following TaskCommands:
This command uses the following AccessBeans:defaultCommandClassName, NAME
Constructor and Description |
---|
RFQAttachmentReplaceCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Gets the description
|
java.lang.Long |
getOldAttachmentId()
Gets the attachment ID.
|
AccessVector |
getResources()
Gets the access vector accessed by this command.
|
java.lang.Long |
getRfqId()
Gets the rfqId
|
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 |
setOldAttachmentId(java.lang.Long oldAttachmentId)
Sets the attachment ID.
|
void |
setRequestProperties(TypedProperty reqParms)
Retrieves the identifier of the RFQ, old attachment id, and new attachment description.
The WebController calls the setRequestProperties method before invoking the execute method in this command. |
void |
setRfqId(java.lang.Long rfqId)
Sets the rfqId
|
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
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 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
DeleteRFQAttachmentCmd
for removing the RFQ and old attachment relationship.
Calls MarkAttachmentForDeleteCmd
for mark for delete the attachment
Calls 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 getRfqId()
public void setRfqId(java.lang.Long rfqId)
rfqId
- The rfqId 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 setpublic java.lang.Long getOldAttachmentId()
public void setOldAttachmentId(java.lang.Long oldAttachmentId)
attachmentId
- The attachmentId to set