com.ibm.commerce.tools.attachment.commands

Class AttachmentUploadCmdImpl

    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field
        See Also:
        Constant Field Values
    • Constructor Detail

      • AttachmentUploadCmdImpl

        public AttachmentUploadCmdImpl()
    • Method Detail

      • storeFile

        public void storeFile()
                       throws ECException
        This method will retrieve the file from the stream and store the file's content into CMFILE table.
        Throws:
        ECException - if the file has size zero or is too big or does not a valid file extension.
      • setRequestProperties

        public void setRequestProperties(TypedProperty req)
        This method sets the input parameters from the request properties for the controller command. The parameters are the redirect URL, the directory where the uploaded file belongs and the uploaded file itself.
        Specified by:
        setRequestProperties in interface ControllerCommand
        Overrides:
        setRequestProperties in class ControllerCommandImpl
        Parameters:
        req - The request properties.
      • needUnzip

        public boolean needUnzip()
        Whether or not the uploaded file should be unzipped.
        Returns:
        If return is true, the zip file will be extracted and each extracted file will be added as managed file; if return is false, the ZIP file itself will be added as managed file.