public class ExceedMaxItemQuantityRuleValidator extends AbstractGiftListRulesValidator
ExceedMaxItemQuantityRuleValidator
class validates a gift
list to ensure that the quantity of any gift item added to the list does not
exceed a configured maximum number. The validation occurs when the gift
registry is created or updated.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
ExceedMaxItemQuantityRuleValidator() |
Modifier and Type | Method and Description |
---|---|
boolean |
validateOnCreate(java.lang.Object noun,
java.lang.Object nounPart,
java.lang.Integer rule)
Validate the rule when the gift list object is being created.
|
boolean |
validateOnUpdate(java.lang.Object noun,
java.lang.Object nounPart,
java.lang.Integer rule)
Validate the rule when the gift list object is being updated.
|
validateOnDelete
public static final java.lang.String COPYRIGHT
public boolean validateOnCreate(java.lang.Object noun, java.lang.Object nounPart, java.lang.Integer rule) throws GiftListRuleValidationException
validateOnCreate
in interface GiftListRulesValidator
validateOnCreate
in class AbstractGiftListRulesValidator
noun
- The GiftList
noun that need to be validated.nounPart
- The GiftList
noun part to use to validate the
part data against a rule, rather than using the whole GiftList
noun.rule
- The rule name.GiftListRuleValidationException
public boolean validateOnUpdate(java.lang.Object noun, java.lang.Object nounPart, java.lang.Integer rule) throws GiftListRuleValidationException
validateOnUpdate
in interface GiftListRulesValidator
validateOnUpdate
in class AbstractGiftListRulesValidator
noun
- The GiftList
noun that need to be validated.nounPart
- The GiftList
noun part to use to validate the
part data against a rule, rather than using the whole GiftList
noun.rule
- The rule name.GiftListRuleValidationException