Package de.espirit.firstspirit.agency
Interface RuleValidationAgent
@Experimental
public interface RuleValidationAgent
This agent allows for validating rules of a
Template
.- Since:
- 5.2.240307
-
Field Summary
Modifier and TypeFieldDescriptionstatic final SpecialistType<RuleValidationAgent>
The agent's technical type to be used to request the agent from aSpecialistsBroker
. -
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<RuleValidationFailure>
validateRules
(@NotNull Template template) Validates the given rule definition by parsing the rule definition of the given template.@NotNull Collection<RuleValidationFailure>
validateRules
(@NotNull String ruleSetDefinition, @NotNull GomEditorProvider gomEditorProvider) Validates the given rule definition by parsing the XML content and evaluating all detected rules.
-
Field Details
-
TYPE
The agent's technical type to be used to request the agent from aSpecialistsBroker
.- Since:
- 5.2.240307
-
-
Method Details
-
validateRules
@NotNull @NotNull Collection<RuleValidationFailure> validateRules(@NotNull @NotNull String ruleSetDefinition, @NotNull @NotNull GomEditorProvider gomEditorProvider) Validates the given rule definition by parsing the XML content and evaluating all detected rules. This method is intended to by used for validating rules during the editing process, i.e. without persisting the rules to the corresponding template yet.- Parameters:
ruleSetDefinition
- The rule set in XML format, containing RULES as its surrounding tag.gomEditorProvider
- Used to detect unknown editors.- Returns:
- All detected validation failures or an empty collection if there are none, but never
null
. - Since:
- 5.2.240307
-
validateRules
@NotNull @NotNull Collection<RuleValidationFailure> validateRules(@NotNull @NotNull Template template) Validates the given rule definition by parsing the rule definition of the given template. This method is intended to by used for validating rules after the template has been saved.- Parameters:
template
- The template to check the rules for, nevernull
.- Returns:
- All detected validation failures or an empty collection if there are none, but never
null
. - Since:
- 5.2.240307
-