Class RuleComponentsValidatorImpl

java.lang.Object
com.codebarrel.automation.api.validation.RuleComponentsValidatorImpl
All Implemented Interfaces:
RuleComponentsValidator

@Component public class RuleComponentsValidatorImpl extends Object implements RuleComponentsValidator
  • Constructor Details

  • Method Details

    • validateForExecution

      public void validateForExecution(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean rule, RemoteConnectUser remoteUser, ErrorCollection errors)
      Description copied from interface: RuleComponentsValidator
      Validates the list of configs provided for rule execution, by using the ComponentValidators provided in the system at runtime.

      If no validator can be found for a particular component, then it will simply be skipped (i.e. no validation will be performed.

      Specified by:
      validateForExecution in interface RuleComponentsValidator
      Parameters:
      rule - the rule whose components to validate
      remoteUser - the user performing the action
      errors - the error collection to add errors to
    • validate

      public void validate(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean rule, RemoteConnectUser remoteUser, ErrorCollection errors)
      Description copied from interface: RuleComponentsValidator
      Validates the list of configs provided, by using the ComponentValidators provided in the system at runtime.

      If no validator can be found for a particular component, then it will simply be skipped (i.e. no validation will be performed.

      Specified by:
      validate in interface RuleComponentsValidator
      Parameters:
      rule - the rule whose components to validate
      remoteUser - the user performing the action
      errors - the error collection to add errors to
    • validateParse

      public void validateParse(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean config, RemoteConnectUser remoteUser, ErrorCollection errors)
      Description copied from interface: RuleComponentsValidator
      This is a less detailed validation that checks all components are present and the rule has all the required elements, but doesn't actually validate all the individual components.

      This should be used when disableding a rule for example.

      Specified by:
      validateParse in interface RuleComponentsValidator
      Parameters:
      context - The tenant context we're in
      config - the rule whose components to validate
      remoteUser - the user performing the action
      errors - the error collection to add errors to