public static final class AclEntry.Builder extends Object
AclEntry objects.
A Builder object is obtained by invoking one of the newBuilder methods defined by the AclEntry class.
Builder objects are mutable and are not safe for use by multiple concurrent threads without appropriate synchronization.
| Modifier and Type | Method and Description |
|---|---|
AclEntry |
build()
Constructs an
AclEntry from the components of this builder.
|
AclEntry |
setFlags(AclEntryFlag
Sets the flags component of this builder.
|
AclEntry |
setFlags(Set
Sets the flags component of this builder.
|
AclEntry |
setPermissions(AclEntryPermission
Sets the permissions component of this builder.
|
AclEntry |
setPermissions(Set
Sets the permissions component of this builder.
|
AclEntry |
setPrincipal(UserPrincipal
Sets the principal component of this builder.
|
AclEntry |
setType(AclEntryType
Sets the type component of this builder.
|
public AclEntrybuild()
AclEntry from the components of this builder. The type and who components are required to have been set in order to construct an
AclEntry.
IllegalStateException - if the type or who component have not been set
public AclEntry.Builder setType(AclEntryType type)
type - the component type
public AclEntry.Builder setPrincipal(UserPrincipal who)
who - the principal component
public AclEntry.Builder setPermissions(Set <AclEntryPermission > perms)
perms - the permissions component
ClassCastException - if the set contains elements that are not of type
AclEntryPermission
public AclEntry.Builder setPermissions(AclEntryPermission ... perms)
perms - the permissions component
public AclEntry.Builder setFlags(Set <AclEntryFlag > flags)
flags - the flags component
ClassCastException - if the set contains elements that are not of type
AclEntryFlag
public AclEntry.Builder setFlags(AclEntryFlag ... flags)
flags - the flags component