Package org.bremersee.acl
Class ImmutableAclUserContext.Builder
java.lang.Object
org.bremersee.acl.ImmutableAclUserContext.Builder
- Enclosing class:
ImmutableAclUserContext
@Generated(from="AclUserContext",
generator="Immutables")
public static final class ImmutableAclUserContext.Builder
extends Object
Builds instances of type
ImmutableAclUserContext.
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.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newImmutableAclUserContext.from(AclUserContext instance) Fill a builder with attribute values from the providedAclUserContextinstance.groups(Collection<String> groups) Initializes the value for thegroupsattribute.Initializes the value for thenameattribute.roles(Collection<String> roles) Initializes the value for therolesattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedAclUserContextinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the value for thenameattribute.If not set, this attribute will have a default value as returned by the initializer of
name.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
roles
Initializes the value for therolesattribute.If not set, this attribute will have a default value as returned by the initializer of
roles.- Parameters:
roles- The value for roles- Returns:
thisbuilder for use in a chained invocation
-
groups
Initializes the value for thegroupsattribute.If not set, this attribute will have a default value as returned by the initializer of
groups.- Parameters:
groups- The value for groups- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableAclUserContext.- Returns:
- An immutable instance of AclUserContext
- Throws:
IllegalStateException- if any required attributes are missing
-