com.ibm.commerce.rfq.commands

Class RFQResponseAttachmentUploadCmdImpl

    • Field Detail

      • COPYRIGHT

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

      • RFQResponseAttachmentUploadCmdImpl

        public RFQResponseAttachmentUploadCmdImpl()
    • Method Detail

      • getDescription

        public java.lang.String getDescription()
        Gets the description
        Returns:
        Returns a String
      • getResponseId

        public java.lang.Long getResponseId()
        Gets the responseId
        Returns:
        Returns a Long
      • getRfqId

        public java.lang.Long getRfqId()
        Gets the rfqId
        Returns:
        Returns a Long
      • performExecute

        public void performExecute()
                            throws ECException
        Save the attachment to datastore. Calls super.performExecute() for uploading the attachment.

        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface com.ibm.websphere.command.TargetableCommand
        Overrides:
        performExecute in class AttachmentUploadCmdImpl
        Throws:
        ECException
        See Also:
        ControllerComand#performExecute
      • setDescription

        public void setDescription(java.lang.String newDescription)
        Sets the description
        Parameters:
        newDescription - The description to set
      • setRequestProperties

        public void setRequestProperties(TypedProperty reqParms)
                                  throws ECException
        Calls super.setRequestProperties to retrieve the attach file content.
        After this, retrieve that attachment description.
        The WebController calls the setRequestProperties method before invoking the execute method in this command.
        Specified by:
        setRequestProperties in interface ControllerCommand
        Overrides:
        setRequestProperties in class AttachmentUploadCmdImpl
        Parameters:
        com.ibm.commerce.datatype.TypedProperty - request parameters
        Throws:
        ECException
        See Also:
        ContollerCommand#setRequestProperties()
      • setResponseId

        public void setResponseId(java.lang.Long newResponseId)
        Sets the responseId
        Parameters:
        newResponseId - The response Id to set
      • setRfqId

        public void setRfqId(java.lang.Long newRfqId)
        Sets the rfqId
        Parameters:
        newRfqId - The rfqId to set
      • updateDescription

        public void updateDescription()
                               throws ECException
        Update the description of the attachment.

        Throws:
        ECException.
        ECException
      • validateParameters

        public void validateParameters()
                                throws ECException
        Checks if the RFQ id has been set, and if specified RFQ exist.

        Specified by:
        validateParameters in interface ECCommand
        Overrides:
        validateParameters in class UploadToStreamCmdImpl
        Throws:
        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.