Interface AttributeValue
- All Superinterfaces:
AttributeOrAttributeValue<AttributeValue>
- All Known Implementing Classes:
Address,AuthorizationActionAttributes,AuthorizationResourceAttributes,BinaryAttributeValue,ComplexAttributeValue,ContextAttributes,Device,Email,Entitlement,GraphQLAuthorizationActionAttributes,GraphQLAuthorizationResourceAttributes,Group,InstantMessaging,LinkedAccount,ListAttributeValue,MapAttributeValue,Meta,MultiValuedAttributeValue,Name,NullAttributeValue,OAuthAuthorizationActionAttributes,OAuthAuthorizationResourceAttributes,PhoneNumber,Photo,PrimitiveAttributeValue,PrimitiveAttributeValue.StringAttributeValue,Role,ScimAuthorizationActionAttributes,ScimAuthorizationResourceAttributes,SubjectAttributes,X509Certificates
Object representing an Attribute value.
Instances of this type are created using factory methods. For example:
AttributeValue<String> name = AttributeValue.of("attr");
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic InstantconvertToInstant(String dateString) Convert a date String with the default timezoned-format used in SCIM to anInstant.static StringformatAsStringAttributeValue(Instant instant) Formats the provided Instant in ISO-8601 format without any offset (i.e., in Zulu time).static StringformatAsStringAttributeValue(ZonedDateTime dateTime) Formats the provided ZonedDateTime using the ISO-8601 format without any offset.default ObjectbooleanisEmpty()default @Nullable AttributeValuemap(String parentPath, AttributeOrAttributeValueTransformer transform) Apply the provided transformation on eachAttributeandAttributeValuein this attribute tree, recursively.static AttributeValueof(@Nullable Comparable<?> value) static AttributeValueAttempt to convert the given Object into anAttributeValue.static AttributeValuestatic AttributeValuestatic AttributeValueofStringOrArray(StringOrArray value) Convert the givenStringOrArrayto anAttributeValue.Methods inherited from interface se.curity.identityserver.sdk.attribute.AttributeOrAttributeValue
getValue, getValueWithMetadata
-
Method Details
-
isEmpty
boolean isEmpty()- Returns:
- true if this AttributeValue is semantically empty, ie. has no value.
-
getValueWithAuthorities
- Returns:
- a representation of the attribute value allowing for multiple nested attributes with the same name
and different authorities. See
MapAttributeValue.getValueWithAuthorities()for further information. - Since:
- 5.0.0
-
map
@Nullable default @Nullable AttributeValue map(String parentPath, AttributeOrAttributeValueTransformer transform) Description copied from interface:AttributeOrAttributeValueApply the provided transformation on eachAttributeandAttributeValuein this attribute tree, recursively.- Specified by:
mapin interfaceAttributeOrAttributeValue<AttributeValue>- Parameters:
parentPath- of the current attribute or value being transformed.transform- transformation function.- Returns:
- the transformed attribute or value
-
of
Attempt to convert the given Object into anAttributeValue.- Parameters:
value- to be converted- Returns:
- a valid AttributeValue if possible.
- Throws:
IllegalArgumentException- if it is not possible to convert the given value to an AttributeValue.
-
of
-
of
-
of
-
ofStringOrArray
Convert the givenStringOrArrayto anAttributeValue.- Parameters:
value- to convert- Returns:
- the value as an
AttributeValue - Since:
- 5.3.0
-
formatAsStringAttributeValue
Formats the provided Instant in ISO-8601 format without any offset (i.e., in Zulu time).- Parameters:
instant- instant to be formatted- Returns:
- the instant in the UTC timezone with format 'YYYY-MM-DDThh:mm:ssZ'
-
formatAsStringAttributeValue
Formats the provided ZonedDateTime using the ISO-8601 format without any offset.- Parameters:
dateTime- dateTime to be formatted- Returns:
- the dateTime in the appropriate timezone with format 'YYYY-MM-DDThh:mm:ssZ'
-
convertToInstant
Convert a date String with the default timezoned-format used in SCIM to anInstant.- Parameters:
dateString- String in the default timezoned-format used in SCIM.- Returns:
- Instant
-