Constructor and Description |
---|
Builder()
Create new empty builder.
|
Builder(Acl acl)
Create and initialize builder with ACL information provided in
acl . |
Modifier and Type | Method and Description |
---|---|
Acl |
build()
Create immutable
Acl instance of the current state. |
Acl.Builder |
setDenies(Collection<Principal> denies)
Replace existing deny users and groups.
|
Acl.Builder |
setDenyGroups(Collection<GroupPrincipal> denyGroups)
Replace existing deny groups.
|
Acl.Builder |
setDenyUsers(Collection<UserPrincipal> denyUsers)
Replace existing deny users.
|
Acl.Builder |
setEverythingCaseInsensitive() |
Acl.Builder |
setEverythingCaseSensitive() |
Acl.Builder |
setInheritanceType(Acl.InheritanceType inheritType)
Set the type of inheritance of ACL information used to combine authz
decisions of these ACLs with its child.
|
Acl.Builder |
setInheritFrom(DocId inheritFrom)
Set
DocId to inherit ACLs from. |
Acl.Builder |
setInheritFrom(DocId inheritFrom,
String fragment)
Set the parent to inherit ACLs from.
|
Acl.Builder |
setPermitGroups(Collection<GroupPrincipal> permitGroups)
Replace existing permit groups.
|
Acl.Builder |
setPermits(Collection<Principal> permits)
Replace existing permit users and groups.
|
Acl.Builder |
setPermitUsers(Collection<UserPrincipal> permitUsers)
Replace existing permit users.
|
public Builder()
null
, and inheritType is Acl.InheritanceType.LEAF_NODE
.public Builder(Acl acl)
acl
.acl
- aclpublic Acl.Builder setPermitGroups(Collection<GroupPrincipal> permitGroups)
permitGroups
- permitGroupsNullPointerException
- if the collection is null
or
contains null
IllegalArgumentException
- if the collection contains ""
or a value that has leading or trailing whitespacepublic Acl.Builder setDenyGroups(Collection<GroupPrincipal> denyGroups)
denyGroups
- denyGroupsNullPointerException
- if the collection is null
or
contains null
IllegalArgumentException
- if the collection contains ""
or a value that has leading or trailing whitespacepublic Acl.Builder setPermitUsers(Collection<UserPrincipal> permitUsers)
permitUsers
- permitUsersNullPointerException
- if the collection is null
or
contains null
IllegalArgumentException
- if the collection contains ""
or a value that has leading or trailing whitespacepublic Acl.Builder setDenyUsers(Collection<UserPrincipal> denyUsers)
denyUsers
- denyUsersNullPointerException
- if the collection is null
or
contains null
IllegalArgumentException
- if the collection contains ""
or a value that has leading or trailing whitespacepublic Acl.Builder setPermits(Collection<Principal> permits)
permits
- permitsNullPointerException
- if the collection is null
or
contains null
IllegalArgumentException
- if the collection contains ""
or a value that has leading or trailing whitespacepublic Acl.Builder setDenies(Collection<Principal> denies)
denies
- deniesNullPointerException
- if the collection is null
or
contains null
IllegalArgumentException
- if the collection contains ""
or a value that has leading or trailing whitespacepublic Acl.Builder setInheritFrom(DocId inheritFrom)
DocId
to inherit ACLs from. This is also known as the
"parent's" ACLs. Note that the parent's InheritanceType
determines how to combine results with this ACL.inheritFrom
- inheritFromsetInheritanceType(com.google.enterprise.adaptor.Acl.InheritanceType)
public Acl.Builder setInheritFrom(DocId inheritFrom, String fragment)
InheritanceType
determines how to combine results with this ACL.
The fragment facilitates a single parent DocId
having multiple ACLs to inherit from. For example
a single parent DocId could have ACLs that are to be inherited
by sub-folder DocId
instances and different
ACLs that are to be inherited by children files.
The fragment allows specifying which of the parent's ACLs
is to be inherited from.
inheritFrom
- inheritFromfragment
- fragmentsetInheritanceType(com.google.enterprise.adaptor.Acl.InheritanceType)
public Acl.Builder setInheritanceType(Acl.InheritanceType inheritType)
inheritType
- inheritTypeNullPointerException
- if inheritType
is null
setInheritFrom(com.google.enterprise.adaptor.DocId)
public Acl.Builder setEverythingCaseSensitive()
public Acl.Builder setEverythingCaseInsensitive()