java.lang.ObjectCacheableCommandImpl
com.ibm.commerce.command.AbstractECTargetableCommand
com.ibm.commerce.command.ControllerCommandImpl
com.ibm.commerce.command.TempUploadCmdImpl
The TempUploadCmd will upload File to a file system with a unique generated filename Note that this is not registered in URLREG or CMDREG, TempUPloadCmd is not intended to be used directly , it should be extended by other commands The upload path to be uploaded is $wcsstore\storename\filepath $wcsstore is defined in instance configuration file storename is based on store_id retrieved from command context , i.e. the store user logs in filepath is user specified subdirectories the uploaded filename is a unique generated filename
Field Summary | |
static java.lang.String | COPYRIGHT IBM Copyright notice field. |
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.command.TempUploadCmd |
defaultCommandClassName |
Constructor Summary | |
TempUploadCmdImpl() |
Method Summary | |
java.lang.String | constructFileString() To construct the attachmenturl |
long | getAttachmentOwner() Gets the creator of uploaded attachment the user who logs on to the store. |
java.lang.String | getAttachmentURL() Gets the attachmentURL of the uploaded file |
protected java.lang.String | getContentType() Gets the contenttype of uploaded attachment |
java.lang.String | getErrorURL() Gets the errorURL to be redirected when an error occurs during upload |
protected java.lang.String | getFileExtension() Gets the file extension |
protected java.lang.String | getFileName_NoExt() Gets the filename with no extension |
java.lang.String | getFileName() Gets the fileName of uplaoded file |
java.lang.String | getFilePath() Gets the filepath (after the predefined path ) of the attachment to be uploaded. |
long | getFileSize() Gets the filesize of upload file |
java.lang.String | getRename() Gets the rename if the uploaded file |
java.lang.String | getRootPath() Gets the rootPath of where the file should be uploaded . |
java.lang.String | getStoreName() Gets the storeName from command context . |
java.lang.String | getUrl() Gets the Url to be returned when upload is completed . |
void | performExecute() This method contains the main business logic of this command. |
void | setErrorURL(java.lang.String errorURL) Sets the errorURL to be forwarded when an error occurs during upload |
void | setFilePath(java.lang.String path) Sets the subdirectories (after the predefined path) of the attachment to be uploaded. |
void | setRefCmd(java.lang.String name) Sets the refcmd of the the command which extends the base TempUpload. |
void | setRename(java.lang.String name) Sets the name that user rename the uploaded file |
void | setRequestProperties(TypedProperty reqParms) Sets the request properties |
void | setRootPath(java.lang.String path) Sets the rootPath of where the file should be uploaded . |
void | setUrl(java.lang.String returnURL) Sets the Url to be returned/redriected when upload is completed . |
void | validateParameters() Checks the validity of the parameters. |
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, getResources, 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.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, getResources, getStoreId, getUser, getUserId, setCommandContext, setCommandIfName, setCommandStoreId, setDefaultProperties |
Methods inherited from interface com.ibm.commerce.security.Protectable |
fulfills, getOwner |
Field Detail |
public static final java.lang.String COPYRIGHT
Constructor Detail |
public TempUploadCmdImpl()
Method Detail |
public java.lang.String getAttachmentURL()
public void setErrorURL(java.lang.String errorURL)
public void setFilePath(java.lang.String path)
public java.lang.String getFilePath()
public void setRefCmd(java.lang.String name)
public void setRename(java.lang.String name)
public void setUrl(java.lang.String returnURL)
public java.lang.String getRename()
public void setRootPath(java.lang.String path)
public java.lang.String getRootPath()
public java.lang.String getStoreName()
public java.lang.String getFileName()
public java.lang.String getUrl()
public java.lang.String getErrorURL()
public long getFileSize()
public long getAttachmentOwner()
protected java.lang.String getContentType()
protected java.lang.String getFileName_NoExt()
protected java.lang.String getFileExtension()
public void setRequestProperties(TypedProperty reqParms) throws ECException
will set up all the request parameters e.g. refcmd, filepath,rename,filename,errorURL,Url from the URL gets user_id, store_id from command context gets the configurable paremeters maxuploadsize,viruscheck,supportedfile extension from instance.xml based on refcmd
public void validateParameters() throws ECException
public java.lang.String constructFileString()
public void performExecute() throws ECException
(C) Copyright IBM Corporation 1996, 2005. All Rights Reserved.