Class CreateRFQItemCmdImpl

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

    public class CreateRFQItemCmdImpl
    extends TaskCommandImpl
    implements CreateRFQItemCmd
    This command creates a catalog entry for a "made-to-order" item requested via an RFQ.


    1. Verifies that the mandatory parameters name , offeringId, ownerId, parentProductId are present.
    2. Generates a unique part number for the item, which is the string "RFQ" followed by the current timestamp.
    3. Creates the item object.
    4. Creates the catalog entry description object for the new item in the specified language. If a language identifier has not been provided, the language identifier from the command context will be used.
    5. Creates the catalog entry relationship between the item and the supplied parent product.

    Exception conditions

    • If the item name is not specified.
    • If the RFQ ID is not specified.
    • If the item owner is not specified.
    • If a parent Product ID is not specified.
    This is the default implementation of the CreateRFQItemCmd. 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
      • name

        public java.lang.String name
      • offeringId

        public java.lang.Long offeringId
        Offering Id.
      • parentProductId

        public java.lang.Long parentProductId
        Parent Product Id.
      • shortDescription

        public java.lang.String shortDescription
        Short Description.
      • ownerId

        public java.lang.Long ownerId
        Owner Id.
      • itemId

        public java.lang.Long itemId
        Item Id.
      • languageId

        public java.lang.Integer languageId
        Language Id.
    • Constructor Detail

      • CreateRFQItemCmdImpl

        public CreateRFQItemCmdImpl()
        Default Constructor.
    • Method Detail

      • reset

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

        public java.lang.Long getItemId()
        Retrieves the ID of the newly created item.
        Specified by:
        getItemId in interface CreateRFQItemCmd
        The item ID.
      • getLanguageId

        public java.lang.Integer getLanguageId()
        Retrieves the language identifier.
        The language identifier.
      • getName

        public java.lang.String getName()
        Retrieves the name of the item.
        The item name.
      • getOfferingId

        public java.lang.Long getOfferingId()
        Retrieves the ID of the RFQ.
        The RFQ ID.
      • getOwnerId

        public java.lang.Long getOwnerId()
        Retrieves the member ID of the item owner.
        The item owner's member ID.
      • getParentProductId

        public java.lang.Long getParentProductId()
        Retrieves the ID of the parent product.
        The parent product reference number.
      • getShortDescription

        public java.lang.String getShortDescription()
        Retrieves the short description for the item.
        The short description.
      • performExecute

        public void performExecute()
                            throws ECException
        Creates the RFQ catalog entry relationship. This method does the following:
        1. Creates a new catalog entry for the item requested via an RFQ. The part number for this item is generated using the string "RFQ" and appending to it the current time in milliseconds.
        2. Creates a description for the new catalog entry in the specified language,
        3. Creates a catalog entry relationship between the created item and the supplied parent product.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface
        performExecute in class AbstractECTargetableCommand
        ECSystemException - If a system error occurs while creating the item.
        See Also:
      • setItemId

        public void setItemId(java.lang.Long newItemId)
        Stores the ID of the newly created item.
        The - item ID.
      • setLanguageId

        public void setLanguageId(java.lang.Integer newLanguageId)
        Stores the language identifier.
        Specified by:
        setLanguageId in interface CreateRFQItemCmd
        newLanguageId - The language identifier.
      • setName

        public void setName(java.lang.String newName)
        Stores the item name.
        Specified by:
        setName in interface CreateRFQItemCmd
        newName - The name of the item.
      • setOfferingId

        public void setOfferingId(java.lang.Long newOfferingId)
        Stores the RFQ ID.
        Specified by:
        setOfferingId in interface CreateRFQItemCmd
        newOfferingId - The RFQ ID.
      • setOwnerId

        public void setOwnerId(java.lang.Long newOwnerId)
        Stores the ID of the item owner.
        Specified by:
        setOwnerId in interface CreateRFQItemCmd
        newOwnerId - The member ID of the item's owner.
      • setParentProductId

        public void setParentProductId(java.lang.Long newParentProductId)
        Stores the ID of the parent catalog entry under which this item has been created.
        Specified by:
        setParentProductId in interface CreateRFQItemCmd
        newParentProductId - The parent product reference number.
      • setShortDescription

        public void setShortDescription(java.lang.String newShortDescription)
        Stores a brief description of the item.
        Specified by:
        setShortDescription in interface CreateRFQItemCmd
        newShortDescription - The item's short description.
      • validateParameters

        public void validateParameters()
                                throws ECException
        This method does the following:
        1. Verifies that a name has been provided for the item.
        2. Verifies that the RFQ ID has been provided.
        3. Verifies that member ID has been provided for the RFQ owner.
        4. Verifies that parent product reference number has been provided.
        5. Checks if a language identifier has been specified. If not, set the languageId member variable to the language in the command context.

        Specified by:
        validateParameters in interface ECCommand
        validateParameters in class AbstractECTargetableCommand
        ECApplicationException -
        • If the item name has not been provided.
        • If a member ID has not been provided for the item owner.
        • If a parent product ID has not been provided.
        See Also: