public class AttachmentUploadCmdImpl extends ControllerCommandImpl implements AttachmentUploadCmd
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM copyright notice field
|
Constructor and Description |
---|
AttachmentUploadCmdImpl() |
Modifier and Type | Method and Description |
---|---|
protected com.ibm.commerce.server.AttachConfigUtil | getAttachConfig()
Gets the attachment configuration of this command.
|
protected UploadedFile | getUploadedFile()
This method gets the uploaded file.
|
protected boolean | isSupportedFileExtension(java.lang.String fileExtension, java.lang.String supportedFileExtensions)
Check if the file extension is one of the supported file extensions.
|
boolean | needUnzip()
Whether or not the uploaded file should be unzipped.
|
void | performExecute()
This method stores the uploaded file from the request properties into CMFILE table.
|
protected void | processZipFile(java.io.InputStream inputStream)
If unzip is set true, this method is called to process the uploaded zip file.
|
void | setRequestProperties(TypedProperty req)
This method sets the input parameters from the request properties for the controller command.
|
void | storeFile()
This method will retrieve the file from the stream and store the file's content into CMFILE table.
|
protected void | validateFile()
This method will check if the file is valid.
|
void | validateParameters()
Validates the input parameters.
|
protected void | validateZipFile(UploadedFile zipFile)
Validate if the zip file is valid.
|
public static final java.lang.String COPYRIGHT
public void storeFile() throws ECException
protected void validateFile() throws ECException
public void performExecute() throws ECException
public void setRequestProperties(TypedProperty req)
public void validateParameters() throws ECException
This implementation is the default one from the super class.
protected com.ibm.commerce.server.AttachConfigUtil getAttachConfig() throws ECApplicationException
public boolean needUnzip()
protected boolean isSupportedFileExtension(java.lang.String fileExtension, java.lang.String supportedFileExtensions)
protected void validateZipFile(UploadedFile zipFile) throws ECApplicationException
protected void processZipFile(java.io.InputStream inputStream) throws ECException, java.io.IOException
protected UploadedFile getUploadedFile()