@NotThreadSafe public static final class ImmutableAuthenticationSubject.Builder extends Object
ImmutableAuthenticationSubject.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
ImmutableAuthenticationSubject |
build()
Builds a new
ImmutableAuthenticationSubject. |
ImmutableAuthenticationSubject.Builder |
customProperties(Map<String,String> customProperties)
Initializes the value for the
customProperties attribute. |
ImmutableAuthenticationSubject.Builder |
from(AuthenticationSubject instance)
Fill a builder with attribute values from the provided
AuthenticationSubject instance. |
ImmutableAuthenticationSubject.Builder |
isFromExternalAuth(boolean isFromExternalAuth)
Initializes the value for the
isFromExternalAuth attribute. |
ImmutableAuthenticationSubject.Builder |
roleName(String roleName)
Initializes the value for the
roleName attribute. |
ImmutableAuthenticationSubject.Builder |
token(String token)
Initializes the value for the
token attribute. |
public final ImmutableAuthenticationSubject.Builder from(AuthenticationSubject instance)
AuthenticationSubject instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableAuthenticationSubject.Builder token(@Nullable String token)
token attribute.token - The value for token (can be null)this builder for use in a chained invocationpublic final ImmutableAuthenticationSubject.Builder roleName(String roleName)
roleName attribute.roleName - The value for roleNamethis builder for use in a chained invocationpublic final ImmutableAuthenticationSubject.Builder isFromExternalAuth(boolean isFromExternalAuth)
isFromExternalAuth attribute.isFromExternalAuth - The value for isFromExternalAuththis builder for use in a chained invocationpublic final ImmutableAuthenticationSubject.Builder customProperties(Map<String,String> customProperties)
customProperties attribute.customProperties - The value for customPropertiesthis builder for use in a chained invocationpublic ImmutableAuthenticationSubject build()
ImmutableAuthenticationSubject.IllegalStateException - if any required attributes are missingCopyright © 2024. All rights reserved.