@MinDoc(copyright="Copyright 2004, 2009, 2015 A. Weinert", author="Albrecht Weinert", version="V.11", lastModified="5.02.2019", lastModifiedBy="A. Weinert", usage="use for permissions (for actions) and their execution", purpose="entry for list of (access) rights") public class ACLentry extends PermissionCollection implements Serializable
AclEntry
).Permission
s. That
container or this object as such a container belongs to exactly one
(Principal
object as its owner.
Modifier and Type | Field and Description |
---|---|
static Identity |
ANY_ID
Owner / source / identity is arbitrary.
|
static String |
ILLEGAL_USER
Negative acknowledgement: illegal user / operator.
|
boolean |
negative
Was constructed as a (list of) prohibitions.
|
static String |
REFUSED
For negative acknowledgement.
|
Constructor and Description |
---|
ACLentry(boolean negative)
Constructor as positive rights or negative prohibition list.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Permission permission)
Add a permission to this list.
|
Permission |
checkPermission(CharSequence name)
Check if a permission (by name) is in this list.
|
boolean |
checkPermission(Permission permission)
Check if permission is in this list.
|
Object |
clone()
Copy this ACLentry.
|
Enumeration<Permission> |
elements()
Enumerate the permissions.
|
Principal |
getPrincipal()
Get the owner of this entry / list of rights.
|
boolean |
implies(Permission permission) |
int |
invokeAll()
Execute the operations (if feasible and allowed).
|
boolean |
removePermission(Permission permission)
Remove permission from this list.
|
boolean |
setPrincipal(Principal user)
Set the owner of this entry / list of rights.
|
isReadOnly, setReadOnly, toString
public final boolean negative
Permission
s stored in this object as
prohibitions (for ever).public static final String REFUSED
public static final String ILLEGAL_USER
public ACLentry(boolean negative)
negative
- true: make it a prohibition listpublic boolean implies(Permission permission)
implies
in class PermissionCollection
public Object clone()
Principal
and Permission
are (should be) immutable.public final Principal getPrincipal()
public final boolean setPrincipal(Principal user)
Identity
value ANY_ID
.getPrincipal()
,
clone()
public final Permission checkPermission(CharSequence name)
Permission
in this container (list of rights) matching the given name. If none
is found null is returned.Permission
object's name the result of
Permission.toString()
is
taken by this method.public final boolean checkPermission(Permission permission)
Permission
s are considered as equals if the
are the same object.add()
to allow (or forbid) a new not yet
contained entry. As a consequence, a Permission
for
which this method returns false (not contained) may nevertheless be not
be added by add(permission)
.public void add(Permission permission)
read only
a SecurityException will
occur.add
in class PermissionCollection
public final boolean removePermission(Permission permission)
read only
false is
returned, too. Permission
to be found and removed must be
the same object as referred to by the parameter.public Enumeration<Permission> elements()
removePermission()
or
add()
will not be mirrored correctly in
the enumeration returned by this method.elements
in class PermissionCollection
AclEntry.permissions()
public int invokeAll()
negative
permissions respective prohibitions
or if the list of permissions is empty.Permission
s contained that are of
the (extended) type Permit
,
Permit
.invoke()
will be called.REFUSED
nor
throwing an exception will be counted. This count is the return value of
this method.