Class RuleComponentsValidatorImpl
java.lang.Object
com.codebarrel.automation.api.validation.RuleComponentsValidatorImpl
- All Implemented Interfaces:
RuleComponentsValidator
@Component
public class RuleComponentsValidatorImpl
extends Object
implements RuleComponentsValidator
-
Constructor Summary
ConstructorsConstructorDescriptionRuleComponentsValidatorImpl(RuleComponentProvider ruleComponentProvider, I18nFactory i18nFactory, BulkValidatorProvider bulkValidatorProvider, LicenceCheckerService licenceCheckerService) -
Method Summary
Modifier and TypeMethodDescriptionvoidvalidate(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean rule, RemoteConnectUser remoteUser, ErrorCollection errors) Validates the list of configs provided, by using theComponentValidators provided in the system at runtime.voidvalidateForExecution(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean rule, RemoteConnectUser remoteUser, ErrorCollection errors) Validates the list of configs provided for rule execution, by using theComponentValidators provided in the system at runtime.voidvalidateParse(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean config, RemoteConnectUser remoteUser, ErrorCollection errors) 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.
-
Constructor Details
-
RuleComponentsValidatorImpl
@Inject public RuleComponentsValidatorImpl(RuleComponentProvider ruleComponentProvider, I18nFactory i18nFactory, BulkValidatorProvider bulkValidatorProvider, LicenceCheckerService licenceCheckerService)
-
-
Method Details
-
validateForExecution
public void validateForExecution(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean rule, RemoteConnectUser remoteUser, ErrorCollection errors) Description copied from interface:RuleComponentsValidatorValidates the list of configs provided for rule execution, by using theComponentValidators 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:
validateForExecutionin interfaceRuleComponentsValidator- Parameters:
rule- the rule whose components to validateremoteUser- the user performing the actionerrors- 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:RuleComponentsValidatorValidates the list of configs provided, by using theComponentValidators 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:
validatein interfaceRuleComponentsValidator- Parameters:
rule- the rule whose components to validateremoteUser- the user performing the actionerrors- 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:RuleComponentsValidatorThis 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:
validateParsein interfaceRuleComponentsValidator- Parameters:
context- The tenant context we're inconfig- the rule whose components to validateremoteUser- the user performing the actionerrors- the error collection to add errors to
-