Class MetadataPolicy.Builder
java.lang.Object
net.shibboleth.oidc.metadata.policy.MetadataPolicy.Builder
- Enclosing class:
- MetadataPolicy
Builder class for the
MetadataPolicy objects.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ObjectThe value(s) to be added for the claim.The map of any other operators not directly mapped.private ObjectThe default value for the claim to be used in case none is specified.private BooleanThe flag indicating that the claim must have a value.private ObjectThe (forced) value for the claim.The list of values from which the claim must be one of.private StringThe regular expression that the claim value must meet.The list of value(s) from which the claim must be subset of.The list of value(s) from which the claim must be superset of. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the metadata policy corresponding to the current builder state.Set the value(s) to be added for the claim.withCustomOperator(String name, Object value) Add a custom operator to the map of custom operators.withDefaultValue(Object value) Set the default value for the claim to be used in case none is specified.withEssential(Boolean isEssential) Set the flag indicating that the claim must have a value.withOneOfValues(List<Object> values) Set the list of values from which the claim must be one of.withRegexp(String value) Set the regular expression that the claim value must meet.withSubsetOfValues(List<Object> values) Set the list of value(s) from which the claim must be subset of.withSupersetOfValues(List<Object> values) Set the list of value(s) from which the claim must be superset of.Set the (forced) value for the claim.
-
Field Details
-
forcedValue
The (forced) value for the claim. -
add
The value(s) to be added for the claim. -
defaultValue
The default value for the claim to be used in case none is specified. -
oneOfValues
The list of values from which the claim must be one of. -
subsetOfValues
The list of value(s) from which the claim must be subset of. -
supersetOfValues
The list of value(s) from which the claim must be superset of. -
essential
The flag indicating that the claim must have a value. -
regexp
The regular expression that the claim value must meet. -
customOperators
The map of any other operators not directly mapped.
-
-
Constructor Details
-
Builder
public Builder()Constructor.
-
-
Method Details
-
withValue
Set the (forced) value for the claim.- Parameters:
value- What to set.- Returns:
- The builder object with the new value set.
-
withAdd
Set the value(s) to be added for the claim.- Parameters:
value- What to set.- Returns:
- The builder object with the new value set.
-
withDefaultValue
Set the default value for the claim to be used in case none is specified.- Parameters:
value- What to set.- Returns:
- The builder object with the new value set.
-
withOneOfValues
Set the list of values from which the claim must be one of.- Parameters:
values- What to set.- Returns:
- The builder object with the new value set.
-
withSubsetOfValues
Set the list of value(s) from which the claim must be subset of.- Parameters:
values- What to set.- Returns:
- The builder object with the new value set.
-
withSupersetOfValues
Set the list of value(s) from which the claim must be superset of.- Parameters:
values- What to set.- Returns:
- The builder object with the new value set.
-
withEssential
Set the flag indicating that the claim must have a value.- Parameters:
isEssential- What to set.- Returns:
- The builder object with the new value set.
-
withRegexp
Set the regular expression that the claim value must meet.- Parameters:
value- What to set.- Returns:
- The builder object with the new value set.
-
withCustomOperator
Add a custom operator to the map of custom operators.- Parameters:
name- The name of the custom operator.value- The value of the custom operator.- Returns:
- The builder object with the new value set.
- Since:
- 3.1.0
-
build
Build the metadata policy corresponding to the current builder state.- Returns:
- The metadata policy corresponding to the current builder state.
-