Class CheckGiftRegistryItemEligibilityCmdImpl

  • All Implemented Interfaces:
    BusinessObjectDocumentCmd,, ECCommand, ECTargetableCommand, TaskCommand, CheckGiftRegistryItemEligibilityCmd,,,,,,

    public class CheckGiftRegistryItemEligibilityCmdImpl
    extends BusinessObjectDocumentCmdImpl
    implements CheckGiftRegistryItemEligibilityCmd
    Validates the GiftRegistryVO based on business rules.

    Called from Operation: ValidateGiftRegistryValuesCmd
    In Parameter: UpdateGiftRegistryBOD
    Result: Returns ECApplicationException if an error occurs

    The class will validate each of the gift items for the incoming UpdateGiftRegistryBOD.

    A check is done to validate that each item follows the defined business rules stored in the GRREGRULES table.

    If an error occurs when validating a gift registry value object, the GiftRegistryItemVO along with a GiftRegistryMessage will be added to an error hashtable. The hashtable will be returned to as part of the ECApplicationException.

    Possible exception messages include:
    • GiftRegistryMessage._ERR_GIFT_REGISTRY_RULE_VIOLATED.'ruleNumber'
    See Also:
    Serialized Form
    • Field Detail


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

      • CheckGiftRegistryItemEligibilityCmdImpl

        public CheckGiftRegistryItemEligibilityCmdImpl()
    • Method Detail

      • performExecute

        public void performExecute()
                            throws ECApplicationException,
        Executes this command. Validate that each item follows the defined business rules:
        • check if item requested exceeds max allowable quantity - EC_RULE_MAX_NUM_OF_GIFT_ITEM_QTY
        • if item is being removed (eg. quantity being set to 0), EC_RULE_GR_ITEMS_CAN_BE_REMOVED_WITH_PURCHASE_RECORDS
        • if requested quantity can be less than the purchased quantity - EC_RULE_UPDATE_QTY_LESS_THAN_QTY_PURCHASED

        Besides the business rules validation, it also calls validateItemQuantity() to check that the item quantity requested is not negative or zero.
        Specified by:
        performExecute in interface ECCommand
        Specified by:
        performExecute in interface
        performExecute in class AbstractECTargetableCommand