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 Details

    • from

      Fill a builder with attribute values from the provided AccessControlEntry instance. 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:
      this builder for use in a chained invocation
    • permission

      public final ImmutableAccessControlEntry.Builder permission(String permission)
      Initializes the value for the permission attribute.
      Parameters:
      permission - The value for permission
      Returns:
      this builder for use in a chained invocation
    • isGuest

      public final ImmutableAccessControlEntry.Builder isGuest(boolean isGuest)
      Initializes the value for the isGuest attribute.

      If not set, this attribute will have a default value as returned by the initializer of isGuest.

      Parameters:
      isGuest - The value for isGuest
      Returns:
      this builder for use in a chained invocation
    • users

      Initializes the value for the users attribute.

      If not set, this attribute will have a default value as returned by the initializer of users.

      Parameters:
      users - The value for users
      Returns:
      this builder for use in a chained invocation
    • roles

      Initializes the value for the roles attribute.

      If not set, this attribute will have a default value as returned by the initializer of roles.

      Parameters:
      roles - The value for roles
      Returns:
      this builder for use in a chained invocation
    • groups

      public final ImmutableAccessControlEntry.Builder groups(Collection<String> groups)
      Initializes the value for the groups attribute.

      If not set, this attribute will have a default value as returned by the initializer of groups.

      Parameters:
      groups - The value for groups
      Returns:
      this builder for use in a chained invocation
    • build

      Returns:
      An immutable instance of AccessControlEntry
      Throws:
      IllegalStateException - if any required attributes are missing