public class TempUploadCmdImpl extends ControllerCommandImpl implements TempUploadCmd
This class will upload file to a file system with a unique generated filename. Note that this is not registered in the URL configuration or the command configuration. This class is not intended to be used directly. It should be extended by other commands.
The file path to be uploaded is $wcsstore\storename\filepath. $wcsstore is defined in instance configuration file. storename is based on the store_id retrieved from the command context, that is, the store that you logon to. filepath is user input.
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright notice field.
|
Constructor and Description |
---|
TempUploadCmdImpl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String | constructFileString()
This method constructs the attachmenturl.
|
long | getAttachmentOwner()
This method gets the creator of the uploaded attachment, that is, the user who logs on to the store.
|
java.lang.String | getAttachmentURL()
This method gets the attachmenturl of the uploaded file.
|
protected java.lang.String | getContentType()
This method gets the contentType of the uploaded attachment.
|
java.lang.String | getErrorURL()
This method gets the errorURL where the user should be redirected when an error occurs during upload.
|
protected java.lang.String | getFileExtension()
This method gets the file extension.
|
protected java.lang.String | getFileName_NoExt()
This method gets the filename with no extension.
|
java.lang.String | getFileName()
This method gets the fileName of the uploaded file.
|
java.lang.String | getFilePath()
This method gets the file path (after the predefined path) of the attachment to be uploaded.
|
long | getFileSize()
This method gets the filesize of the uploaded file.
|
java.lang.String | getRename()
This method gets the new name that the user wishes to assign to the uploaded file (the "rename").
|
java.lang.String | getRootPath()
This method gets the rootPath where the file should be uploaded.
|
java.lang.String | getStoreName()
This method gets the storeName from the command context.
|
java.lang.String | getUrl()
This method gets the URL to be returned when the upload is completed.
|
void | performExecute()
This method contains the main business logic of this command.
|
void | setErrorURL(java.lang.String errorURL)
This method sets the errorURL to be forwarded when an error occurs during upload.
|
void | setFilePath(java.lang.String path)
This method sets the subdirectories (after the predefined path) of the attachment to be uploaded.
|
void | setRefCmd(java.lang.String name)
This method sets the refcmd of the command which extends the base TempUpload.
|
void | setRename(java.lang.String name)
This method sets the new name that the user wishes to assign to the uploaded file (the "rename").
|
void | setRequestProperties(TypedProperty reqParms)
This method sets the request properties.
|
void | setRootPath(java.lang.String path)
This method sets the rootPath where the file should be uploaded.
|
void | setUrl(java.lang.String returnURL)
This method sets the URL to be returned/redirected when the upload is completed.
|
void | validateParameters()
This method checks the validity of the parameters.
|
public static final java.lang.String COPYRIGHT
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
public void validateParameters() throws ECException
public java.lang.String constructFileString()
public void performExecute() throws ECException