Class CreateOrderCommentsTCCmdImpl

  • All Implemented Interfaces:, ECCommand, ECTargetableCommand, TaskCommand, CreateOrderCommentsTCCmd,,,,,,

    public class CreateOrderCommentsTCCmdImpl
    extends TaskCommandImpl
    implements CreateOrderCommentsTCCmd
    Creates terms and conditions of type "OrderComments".

    This command can be used to convert freeform terms and conditions input, during the course of a negotiation, into Terms and Conditions associated with a trading agreement. When an order results from a trading agreement, the OrderComment TCs will appear customer as comments in the prepared order.


    The command loops through the list of freeform comments and does the following for each comment:

    1. Composes an XML element for an OrderCommentTC that conforms to the Trading DTD.
    2. Creates the OrderComment Term and Condition object using the XML element and the supplied trading agreement ID.

    Exception conditions

    • If the trading agreement ID is not provided.
    • If the list of comments is not provided.
    This is the default implementation of the CreateOrderCommentsTCCmd. This command uses the following AccessBeans:
    See Also:
    Serialized Form
    • Field Detail


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

        public java.lang.Long tradingId
        Trading ID.
      • commentsVector

        public java.util.Vector commentsVector
        Comments Vector.
    • Constructor Detail

      • CreateOrderCommentsTCCmdImpl

        public CreateOrderCommentsTCCmdImpl()
        Default Constructor.
    • Method Detail

      • reset

        public void reset()
        Reset the command.
        Specified by:
        reset in interface
        reset in class AbstractECTargetableCommand
      • getCommentsVector

        public java.util.Vector getCommentsVector()
        Retrieves a vector of freeform comments.
        The list of freeform comments that need to be converted into TCs.
      • getTradingId

        public java.lang.Long getTradingId()
        Retrieves the trading agreement ID.
        The ID of the trading agreement.
      • setCommentsVector

        public void setCommentsVector(java.util.Vector newCommentsVector)
        Stores the list of freeform comments that need to be converted into TCs.
        Specified by:
        setCommentsVector in interface CreateOrderCommentsTCCmd
        newCommentsVector - The list of freeform comments.
      • setTradingId

        public void setTradingId(java.lang.Long newTradingId)
        Stores the incoming trading agreement ID.
        Specified by:
        setTradingId in interface CreateOrderCommentsTCCmd
        newTradingId - The ID of the trading agreement.
      • validateParameters

        public void validateParameters()
                                throws ECException
        This method does the following:
        1. Verifies that a comment list has been provided.
        2. Verifies that a trading agreement ID has been provided.
        3. Verifies that the provided trading agreement ID exists.

        Specified by:
        validateParameters in interface ECCommand
        validateParameters in class AbstractECTargetableCommand
        ECApplicationException -
        • If the comment list has not been provided.
        • If the trading agreement ID has not been provided.
        • If the trading agreement ID does not exist.
        See Also: