Package org.bremersee.acl.model
Class ImmutableAccessControlEntryModifications
java.lang.Object
org.bremersee.acl.model.ImmutableAccessControlEntryModifications
- All Implemented Interfaces:
Comparable<AccessControlEntryModifications>,AccessControlEntryModifications
@Generated(from="AccessControlEntryModifications",
generator="Immutables")
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableAccessControlEntryModifications
extends Object
implements AccessControlEntryModifications
Immutable implementation of
AccessControlEntryModifications.
Use the builder to create immutable instances:
ImmutableAccessControlEntryModifications.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableAccessControlEntryModifications. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableAccessControlEntryModifications.copyOf(AccessControlEntryModifications instance) Creates an immutable copy of aAccessControlEntryModificationsvalue.booleanThis instance is equal to all instances ofImmutableAccessControlEntryModificationsthat have equal attribute values.Groups to be added.Roles to be added.Users to be added.Specifies the permission.Groups to be removed.Roles to be removed.Users to be removed.inthashCode()Computes a hash code from attributes:permission,isGuest,addUsers,removeUsers,addRoles,removeRoles,addGroups,removeGroups.booleanisGuest()Specifies whether anybody is granted or not.toString()Prints the immutable valueAccessControlEntryModificationswith attribute values.withAddGroups(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofaddGroups.withAddGroups(String... elements) Copy the current immutable object with elements that replace the content ofaddGroups.withAddRoles(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofaddRoles.withAddRoles(String... elements) Copy the current immutable object with elements that replace the content ofaddRoles.withAddUsers(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofaddUsers.withAddUsers(String... elements) Copy the current immutable object with elements that replace the content ofaddUsers.withIsGuest(boolean value) Copy the current immutable object by setting a value for theisGuestattribute.withPermission(String value) Copy the current immutable object by setting a value for thepermissionattribute.withRemoveGroups(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofremoveGroups.withRemoveGroups(String... elements) Copy the current immutable object with elements that replace the content ofremoveGroups.withRemoveRoles(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofremoveRoles.withRemoveRoles(String... elements) Copy the current immutable object with elements that replace the content ofremoveRoles.withRemoveUsers(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofremoveUsers.withRemoveUsers(String... elements) Copy the current immutable object with elements that replace the content ofremoveUsers.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bremersee.acl.model.AccessControlEntryModifications
compareTo
-
Method Details
-
getPermission
Specifies the permission.- Specified by:
getPermissionin interfaceAccessControlEntryModifications- Returns:
- the permission
-
isGuest
public boolean isGuest()Specifies whether anybody is granted or not.- Specified by:
isGuestin interfaceAccessControlEntryModifications- Returns:
- whether anybody is granted (true) or not (false)
-
getAddUsers
Users to be added.- Specified by:
getAddUsersin interfaceAccessControlEntryModifications- Returns:
- the users to add
-
getRemoveUsers
Users to be removed.- Specified by:
getRemoveUsersin interfaceAccessControlEntryModifications- Returns:
- the users to remove
-
getAddRoles
Roles to be added.- Specified by:
getAddRolesin interfaceAccessControlEntryModifications- Returns:
- the roles to add
-
getRemoveRoles
Roles to be removed.- Specified by:
getRemoveRolesin interfaceAccessControlEntryModifications- Returns:
- the roles to remove
-
getAddGroups
Groups to be added.- Specified by:
getAddGroupsin interfaceAccessControlEntryModifications- Returns:
- the groups to add
-
getRemoveGroups
Groups to be removed.- Specified by:
getRemoveGroupsin interfaceAccessControlEntryModifications- Returns:
- the groups to remove
-
withPermission
Copy the current immutable object by setting a value for thepermissionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for permission- Returns:
- A modified copy or the
thisobject
-
withIsGuest
Copy the current immutable object by setting a value for theisGuestattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isGuest- Returns:
- A modified copy or the
thisobject
-
withAddUsers
Copy the current immutable object with elements that replace the content ofaddUsers.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAddUsers
Copy the current immutable object with elements that replace the content ofaddUsers. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of addUsers elements to set- Returns:
- A modified copy or
thisif not changed
-
withRemoveUsers
Copy the current immutable object with elements that replace the content ofremoveUsers.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRemoveUsers
Copy the current immutable object with elements that replace the content ofremoveUsers. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of removeUsers elements to set- Returns:
- A modified copy or
thisif not changed
-
withAddRoles
Copy the current immutable object with elements that replace the content ofaddRoles.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAddRoles
Copy the current immutable object with elements that replace the content ofaddRoles. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of addRoles elements to set- Returns:
- A modified copy or
thisif not changed
-
withRemoveRoles
Copy the current immutable object with elements that replace the content ofremoveRoles.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRemoveRoles
Copy the current immutable object with elements that replace the content ofremoveRoles. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of removeRoles elements to set- Returns:
- A modified copy or
thisif not changed
-
withAddGroups
Copy the current immutable object with elements that replace the content ofaddGroups.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAddGroups
Copy the current immutable object with elements that replace the content ofaddGroups. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of addGroups elements to set- Returns:
- A modified copy or
thisif not changed
-
withRemoveGroups
Copy the current immutable object with elements that replace the content ofremoveGroups.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRemoveGroups
Copy the current immutable object with elements that replace the content ofremoveGroups. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of removeGroups elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableAccessControlEntryModificationsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:permission,isGuest,addUsers,removeUsers,addRoles,removeRoles,addGroups,removeGroups. -
toString
Prints the immutable valueAccessControlEntryModificationswith attribute values. -
copyOf
public static ImmutableAccessControlEntryModifications copyOf(AccessControlEntryModifications instance) Creates an immutable copy of aAccessControlEntryModificationsvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable AccessControlEntryModifications instance
-
builder
Creates a builder forImmutableAccessControlEntryModifications.ImmutableAccessControlEntryModifications.builder() .permission(String) // requiredpermission.isGuest(boolean) // optionalisGuest.addAddUsers|addAllAddUsers(String) //addUserselements .addRemoveUsers|addAllRemoveUsers(String) //removeUserselements .addAddRoles|addAllAddRoles(String) //addRoleselements .addRemoveRoles|addAllRemoveRoles(String) //removeRoleselements .addAddGroups|addAllAddGroups(String) //addGroupselements .addRemoveGroups|addAllRemoveGroups(String) //removeGroupselements .build();- Returns:
- A new ImmutableAccessControlEntryModifications builder
-