Class MetadataPolicy.Builder
- java.lang.Object
-
- net.shibboleth.oidc.metadata.policy.MetadataPolicy.Builder
-
- Enclosing class:
- MetadataPolicy
public static class MetadataPolicy.Builder extends Object
Builder class for theMetadataPolicyobjects.
-
-
Field Summary
Fields Modifier and Type Field Description private ObjectaddThe value(s) to be added for the claim.private ObjectdefaultValueThe default value for the claim to be used in case none is specified.private BooleanessentialThe flag indicating that the claim must have a value.private ObjectforcedValueThe (forced) value for the claim.private List<Object>oneOfValuesThe list of values from which the claim must be one of.private StringregexpThe regular expression that the claim value must meet.private List<Object>subsetOfValuesThe list of value(s) from which the claim must be subset of.private List<Object>supersetOfValuesThe list of value(s) from which the claim must be superset of.
-
Constructor Summary
Constructors Constructor Description Builder()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetadataPolicybuild()Build the metadata policy corresponding to the current builder state.MetadataPolicy.BuilderwithAdd(Object value)Set the value(s) to be added for the claim.MetadataPolicy.BuilderwithDefaultValue(Object value)Set the default value for the claim to be used in case none is specified.MetadataPolicy.BuilderwithEssential(Boolean isEssential)Set the flag indicating that the claim must have a value.MetadataPolicy.BuilderwithOneOfValues(List<Object> values)Set the list of values from which the claim must be one of.MetadataPolicy.BuilderwithRegexp(String value)Set the regular expression that the claim value must meet.MetadataPolicy.BuilderwithSubsetOfValues(List<Object> values)Set the list of value(s) from which the claim must be subset of.MetadataPolicy.BuilderwithSupersetOfValues(List<Object> values)Set the list of value(s) from which the claim must be superset of.MetadataPolicy.BuilderwithValue(Object value)Set the (forced) value for the claim.
-
-
-
Field Detail
-
forcedValue
private Object forcedValue
The (forced) value for the claim.
-
add
private Object add
The value(s) to be added for the claim.
-
defaultValue
private Object defaultValue
The default value for the claim to be used in case none is specified.
-
oneOfValues
private List<Object> oneOfValues
The list of values from which the claim must be one of.
-
subsetOfValues
private List<Object> subsetOfValues
The list of value(s) from which the claim must be subset of.
-
supersetOfValues
private List<Object> supersetOfValues
The list of value(s) from which the claim must be superset of.
-
essential
private Boolean essential
The flag indicating that the claim must have a value.
-
regexp
private String regexp
The regular expression that the claim value must meet.
-
-
Method Detail
-
withValue
public MetadataPolicy.Builder withValue(Object value)
Set the (forced) value for the claim.- Parameters:
value- What to set.- Returns:
- The builder object with the new value set.
-
withAdd
public MetadataPolicy.Builder withAdd(Object value)
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
public MetadataPolicy.Builder withDefaultValue(Object value)
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
public MetadataPolicy.Builder withOneOfValues(List<Object> values)
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
public MetadataPolicy.Builder withSubsetOfValues(List<Object> values)
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
public MetadataPolicy.Builder withSupersetOfValues(List<Object> values)
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
public MetadataPolicy.Builder withEssential(Boolean isEssential)
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
public MetadataPolicy.Builder withRegexp(String value)
Set the regular expression that the claim value must meet.- Parameters:
value- What to set.- Returns:
- The builder object with the new value set.
-
build
public MetadataPolicy build()
Build the metadata policy corresponding to the current builder state.- Returns:
- The metadata policy corresponding to the current builder state.
-
-