public final class ResultErrorHelper extends Object
Modifier and Type | Method and Description |
---|---|
static List<ComponentVerifierExtension.VerificationError> |
requiresAny(Map<String,Object> parameters,
Collection<OptionsGroup> groups)
Validates that the given parameters satisfy any grouped options
(
OptionsGroup ). |
static List<ComponentVerifierExtension.VerificationError> |
requiresAny(Map<String,Object> parameters,
OptionsGroup... groups)
Validates that the given parameters satisfy any grouped options
(
OptionsGroup ). |
static Optional<ComponentVerifierExtension.VerificationError> |
requiresOption(String parameterName,
Map<String,Object> parameters) |
public static Optional<ComponentVerifierExtension.VerificationError> requiresOption(String parameterName, Map<String,Object> parameters)
parameterName
- the required optionparameters
- thepublic static List<ComponentVerifierExtension.VerificationError> requiresAny(Map<String,Object> parameters, OptionsGroup... groups)
OptionsGroup
). A parameter set is valid if it is
present and required by least one of the groups.
As an example consider that there are two option groups that can be specified:
Note the special syntax of OptionsGroup.getOptions()
that can require an property ("propertyName"
) or can
forbid the presence of a property ("!propertyName"
).
With that if in the example above if param2 is specified specifying param3 is not allowed, and vice versa option groups should be defined with options:
parameters
- given parameters of a componentgroups
- groups of optionsOptionsGroup
public static List<ComponentVerifierExtension.VerificationError> requiresAny(Map<String,Object> parameters, Collection<OptionsGroup> groups)
OptionsGroup
). A parameter set is valid if it is
present and required by least one of the groups.parameters
- given parameters of a componentgroups
- groups of optionsrequiresAny(Map, OptionsGroup...)
,
OptionsGroup
Apache Camel