com.ibm.commerce.rfq.commands

Class RFQAttachmentUploadCmdImpl

    • Constructor Detail

      • RFQAttachmentUploadCmdImpl

        public RFQAttachmentUploadCmdImpl()
    • Method Detail

      • reset

        public void reset()
        Reset the command
        Specified by:
        reset in interface com.ibm.websphere.command.Command
        Overrides:
        reset in class AbstractECTargetableCommand
      • setRequestProperties

        public void setRequestProperties(TypedProperty reqParms)
                                  throws ECException
        Calls super.setRequestProperties to retrieve the rfq Id and 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:
        ControllerCmd#setRequestProperties(TypedProperty)
      • performExecute

        public void performExecute()
                            throws ECException
        Save the attachment to datastore, and associate the attachment to an RFQ. Calls super.performExecute() for saving Calls TradeAttachmentCreateCmd.execute() for creating the association

        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:
        ECCommand#performExecute()
      • gettradingId

        public java.lang.Long gettradingId()
        Gets the tradingId
        Returns:
        Returns a Long
      • settradingId

        public void settradingId(java.lang.Long tradingId)
        Sets the tradingId
        Parameters:
        tradingId - The tradingId to set
      • 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.
        See Also:
        ECCommand#validateParameters()
      • getDescription

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

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