Package org.bremersee.acl.model
Class ImmutableAccessControlEntry.Builder
java.lang.Object
org.bremersee.acl.model.ImmutableAccessControlEntry.Builder
- Enclosing class:
ImmutableAccessControlEntry
@Generated(from="AccessControlEntry",
generator="Immutables")
public static final class ImmutableAccessControlEntry.Builder
extends Object
Builds instances of type
ImmutableAccessControlEntry.
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 newImmutableAccessControlEntry.from(AccessControlEntry instance) Fill a builder with attribute values from the providedAccessControlEntryinstance.groups(Collection<String> groups) Initializes the value for thegroupsattribute.isGuest(boolean isGuest) Initializes the value for theisGuestattribute.permission(String permission) Initializes the value for thepermissionattribute.roles(Collection<String> roles) Initializes the value for therolesattribute.users(Collection<String> users) Initializes the value for theusersattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedAccessControlEntryinstance. 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
-
permission
Initializes the value for thepermissionattribute.- Parameters:
permission- The value for permission- Returns:
thisbuilder for use in a chained invocation
-
isGuest
Initializes the value for theisGuestattribute.If not set, this attribute will have a default value as returned by the initializer of
isGuest.- Parameters:
isGuest- The value for isGuest- Returns:
thisbuilder for use in a chained invocation
-
users
Initializes the value for theusersattribute.If not set, this attribute will have a default value as returned by the initializer of
users.- Parameters:
users- The value for users- 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 newImmutableAccessControlEntry.- Returns:
- An immutable instance of AccessControlEntry
- Throws:
IllegalStateException- if any required attributes are missing
-