@MinDoc(copyright="Copyright 2000 - 2003, 2009 A. Weinert", author="Albrecht Weinert", version="V.11", lastModified="5.02.2019", lastModifiedBy="A. Weinert", usage="use for actions and their execution", purpose="list of operations") public class Operations extends ACLentry
ACLentry
(by inheritance) and as
such a container for an arbitrary number of
Permission
s. The container is owned by one
Principal
.ACLentry
an object of this class Permit
(and not of the more
general type Permission
.ACLentry.invokeAll()
) invokable operations. This list's
owner, the principal
is taken in this class
as the source of the operation requests.users
and key
, which combined with the
principal
may be used to check the acceptance of
the operation request (accept()
).Modifier and Type | Class and Description |
---|---|
static class |
Operations.List
A list of (lists of) operations.
|
Modifier and Type | Field and Description |
---|---|
char |
key
The key.
|
String |
users
The user list.
|
ANY_ID, ILLEGAL_USER, negative, REFUSED
Constructor and Description |
---|
Operations(Principal source,
CharSequence users,
char key)
Make a list of operations with source, users and key.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Principal source,
String user,
char key)
Check the entitlement of source, user and key.
|
void |
add(Permission permission)
Insert a permission into this list.
|
boolean |
isSame(Principal source,
CharSequence users,
char key)
Check if conditions are equal.
|
checkPermission, checkPermission, clone, elements, getPrincipal, implies, invokeAll, removePermission, setPrincipal
isReadOnly, setReadOnly, toString
public final char key
public final String users
public Operations(Principal source, CharSequence users, char key)
source
- the source of of the operation requests; owner of this
list; must not be nullusers
- list of users allowed to invoke the operations; null means
any one will be accepted.key
- (meaning a stroke from a real button in most using process
control applications) to execute the operation(s); 0 means no
key / any key may invoke.ACLentry.getPrincipal()
public boolean accept(Principal source, String user, char key)
source
- the source of of the operation request; null means no
check. Otherwise it must be the same as ACLentry.getPrincipal()
.user
- the requesting user's name; null means no check; non null
must be contained in the list users
.key
- (meaning a stroke from a real button in most using process
control applications) to execute the operation(s); 0 means no
check / no actual command button.Operations.List.findFirst(Principal, String, char)
public boolean isSame(Principal source, CharSequence users, char key)
accept
the same preconditions for
invoking the operations.source
- the source of of the operation requestusers
- the list of acceptable user's nameskey
- (meaning a stroke from a real button in most using process
control applications) to execute the operation(s)public final void add(Permission permission)
ACLentry
only permissions of
type Permit
will be accepted. Other types will be treated as
null, wehre just nothing is done. read only
a SecurityException will
occur.