Package org.forgerock.openidconnect
Class Claim.ClaimBuilder
java.lang.Object
org.forgerock.oauth.clients.oidc.Claim.ClaimBuilder
org.forgerock.openidconnect.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
-
-
Method Details
-
withLocale
Description copied from class:Claim.ClaimBuilder
Sets the locale of the ClaimBuilder.- Overrides:
withLocale
in classClaim.ClaimBuilder
- Parameters:
locale
- Claim's locale- Returns:
- This builder
-
withStringValues
Description copied from class:Claim.ClaimBuilder
Sets the string values for the ClaimBuilder.- Overrides:
withStringValues
in classClaim.ClaimBuilder
- Parameters:
values
- Values to set, must not be null or empty- Returns:
- This builder
-
withNumericalValues
Description copied from class:Claim.ClaimBuilder
Sets the number values for the ClaimBuilder.- Overrides:
withNumericalValues
in classClaim.ClaimBuilder
- Parameters:
values
- Values to set, must not be null or empty- Returns:
- This builder
-
withBooleanValues
Description copied from class:Claim.ClaimBuilder
Sets the boolean values for the ClaimBuilder.- Overrides:
withBooleanValues
in classClaim.ClaimBuilder
- Parameters:
values
- Values to set, must not be null or empty- Returns:
- This builder
-
isEssential
Description copied from class:Claim.ClaimBuilder
Marks this ClaimBuilder as building an essential claim.- Overrides:
isEssential
in classClaim.ClaimBuilder
- Returns:
- This builder
-
withJsonValue
Description copied from class:Claim.ClaimBuilder
Sets the value for the ClaimBuilder.- Overrides:
withJsonValue
in classClaim.ClaimBuilder
- Parameters:
value
- The JsonValue to set, must not be null- Returns:
- The builder
-
withJsonValues
Description copied from class:Claim.ClaimBuilder
Sets the values for the ClaimBuilder.- Overrides:
withJsonValues
in classClaim.ClaimBuilder
- Parameters:
values
- The JsonValue to set, must not be null- Returns:
- The builder
-
withStringValue
Description copied from class:Claim.ClaimBuilder
Sets the string value for the ClaimBuilder.- Overrides:
withStringValue
in classClaim.ClaimBuilder
- Parameters:
value
- Value to set, must not be null- Returns:
- This builder
-
withNumericalValue
Description copied from class:Claim.ClaimBuilder
Sets the number value for the ClaimBuilder.- Overrides:
withNumericalValue
in classClaim.ClaimBuilder
- Parameters:
value
- Value to set, must not be null- Returns:
- This builder
-
withBooleanValue
Description copied from class:Claim.ClaimBuilder
Sets the boolean value for the ClaimBuilder.- Overrides:
withBooleanValue
in classClaim.ClaimBuilder
- Parameters:
value
- Value to set, must not be null- Returns:
- This builder
-
build
Description copied from class:Claim.ClaimBuilder
Return the claim this builder was building.- Overrides:
build
in classClaim.ClaimBuilder
- Returns:
- A claim with the values set in this Builder
-