Package org.forgerock.oauth.clients.oidc
Class Claim.ClaimBuilder
java.lang.Object
org.forgerock.oauth.clients.oidc.Claim.ClaimBuilder
- Direct Known Subclasses:
Claim.ClaimBuilder
- Enclosing class:
- Claim
Builder to keep the
Claim
immutable.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Return the claim this builder was building.Marks this ClaimBuilder as building an essential claim.withBooleanValue
(Boolean value) Sets the boolean value for the ClaimBuilder.withBooleanValues
(List<Boolean> values) Sets the boolean values for the ClaimBuilder.withJsonValue
(JsonValue value) Sets the value for the ClaimBuilder.withJsonValues
(List<JsonValue> values) Sets the values for the ClaimBuilder.withLocale
(Locale locale) Sets the locale of the ClaimBuilder.withNumericalValue
(Number value) Sets the number value for the ClaimBuilder.withNumericalValues
(List<Number> values) Sets the number values for the ClaimBuilder.withStringValue
(String value) Sets the string value for the ClaimBuilder.withStringValues
(List<String> values) Sets the string values for the ClaimBuilder.
-
Constructor Details
-
ClaimBuilder
Constructor for a ClaimBuilder.- Parameters:
name
- the name of this Claim, optionally with '#'-preceded locale suffix
-
-
Method Details
-
build
Return the claim this builder was building.- Returns:
- A claim with the values set in this Builder
-
withLocale
Sets the locale of the ClaimBuilder.- Parameters:
locale
- Claim's locale- Returns:
- This builder
-
withJsonValue
Sets the value for the ClaimBuilder.- Parameters:
value
- The JsonValue to set, must not be null- Returns:
- The builder
-
withJsonValues
Sets the values for the ClaimBuilder.- Parameters:
values
- The JsonValue to set, must not be null- Returns:
- The builder
-
withStringValues
Sets the string values for the ClaimBuilder.- Parameters:
values
- Values to set, must not be null or empty- Returns:
- This builder
-
withStringValue
Sets the string value for the ClaimBuilder.- Parameters:
value
- Value to set, must not be null- Returns:
- This builder
-
withNumericalValues
Sets the number values for the ClaimBuilder.- Parameters:
values
- Values to set, must not be null or empty- Returns:
- This builder
-
withNumericalValue
Sets the number value for the ClaimBuilder.- Parameters:
value
- Value to set, must not be null- Returns:
- This builder
-
withBooleanValues
Sets the boolean values for the ClaimBuilder.- Parameters:
values
- Values to set, must not be null or empty- Returns:
- This builder
-
withBooleanValue
Sets the boolean value for the ClaimBuilder.- Parameters:
value
- Value to set, must not be null- Returns:
- This builder
-
isEssential
Marks this ClaimBuilder as building an essential claim.- Returns:
- This builder
-