Interface RuleValidation

All Known Implementing Classes:
AttributeRuleValidator, CheckoutRuleValidator, CollectionRuleValidation, ReleaseTargetValidator

public interface RuleValidation
All the validation business rules will implement Rule Validation interface for its execution included in the rules processing framework. A typical validation business rules will fall under 2 primary categories:
  1. Simple validation: The rules check is done on the business object itself. Example could be checking for attribute validation or checking a life cycle state of the object prior to release.
  2. Structured validation: The rules may or may not be performed on the business objects but will include some validation checks on its associated objects like the children of the part or document. In this type of validation, typically more complex set of algorithm might be required to calculate the business validation rules and populate the validation result with appropriate flag.
Example could be that all the children are release prior to releasing the children using change process.

Supported API: true

Extendable: true
  • Method Details

    • performValidation

      RuleValidationResult performValidation(RuleValidationKey validationKey, RuleValidationObject validationObject, RuleValidationCriteria criteria) throws WTException
      Will validate the business object against the rule and add the result to the validation result set.

      Supported API: true
      Parameters:
      validationKey -
      validationObject -
      criteria -
      Returns:
      validation result
      Throws:
      WTException
    • prepareForValidation

      void prepareForValidation(RuleValidationKey validationKey, RuleValidationCriteria criteria) throws WTException
      Allows for batch processing on a list of data objects before performValidation is called on each object.

      Supported API: true
      Parameters:
      validationKey -
      criteria -
      Throws:
      WTException
    • isConfigurationValid

      boolean isConfigurationValid(RuleValidationKey validationKey) throws WTException
      For a given rule configuration will check if the rule is valid to be executed before it gets persisted or prior to executing the rule.

      Supported API: true
      Parameters:
      validationKey -
      Returns:
      true when the configuration is valid
      Throws:
      WTException
    • getSupportedClasses

      Class[] getSupportedClasses(RuleValidationKey validationKey)
      Will return the array of classes that the validation rule will handle.

      Supported API: true
      Parameters:
      validationKey -
      Returns:
      the array of classes