Interface RuleComponentsValidator
- All Known Implementing Classes:
RuleComponentsValidatorImpl
public interface RuleComponentsValidator
Validator that can be used to validate all components of an automation rule.
Implementations should look up validators supplied at runtime.
-
Method Summary
Modifier and TypeMethodDescriptionvoidvalidate(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean config, 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 config, 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.
-
Method Details
-
validate
void validate(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean config, RemoteConnectUser remoteUser, ErrorCollection errors) Validates 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.
- Parameters:
config- the rule whose components to validateremoteUser- the user performing the actionerrors- the error collection to add errors to
-
validateForExecution
void validateForExecution(TenantContext context, com.codebarrel.automation.api.config.RuleConfigBean config, RemoteConnectUser remoteUser, ErrorCollection errors) Validates 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.
- Parameters:
config- the rule whose components to validateremoteUser- the user performing the actionerrors- the error collection to add errors to
-
validateParse
void validateParse(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.This should be used when disableding a rule for example.
- 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
-