@MinDoc(copyright="Copyright 2000 - 2003, 2009 A. Weinert", author="Albrecht Weinert", version="V.11", lastModified="5.02.2019", lastModifiedBy="A. Weinert", usage="use for a permission / operation and its execution", purpose="a permission / a right to act") public class Permit extends Permission implements Serializable
Permission
).toString()
.
The uniqueness of this identification should be
maintained by the users of / factories for this class, as is the case
with ACLentry
.Principal
s ensures their
having a name. If there is a target, its name will be part of this
Permit
's full name in the form
"targetname:purePermitName".target
plus the pure permission's name
getPureName()
as operation the Permit object itself also embodies
the action / operation, to which it is the permission:target
is of the type Permit.Operable
, the method
invoke()
executes this action / operation.Modifier and Type | Class and Description |
---|---|
static interface |
Permit.Operable
Controllable (remotely) function unit.
|
Modifier and Type | Field and Description |
---|---|
String |
asLowerString
The permission's or act's full name in lower case.
|
String |
asString
The permission's or act's full name.
|
int |
hash
The prmissions's hash value.
|
Principal |
target
The target object of the act / permission.
|
Constructor and Description |
---|
Permit(CharSequence name,
Principal target)
Constructor with name and target.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other)
Equality with other Permit.
|
String |
getActions() |
String |
getPureName()
The permission's or act's pure name.
|
Principal |
getTarget()
The target object of the act / permission.
|
int |
hashCode()
The prmissions's hash value.
|
boolean |
implies(Permission permission) |
String |
invoke()
Execute the operation / action / permit (if possible and allowed).
|
String |
toString()
The permission's or action's name.
|
checkGuard, getName, newPermissionCollection
public final String asString
toString()
public final String asLowerString
public final Principal target
public final int hash
public Permit(CharSequence name, Principal target) throws IllegalArgumentException
name
- The (in most contexts unique) name of the permission.target
- The (optional) target. That may be null.IllegalArgumentException
- if violation the rulespublic boolean implies(Permission permission)
implies
in class Permission
public String getActions()
getActions
in class Permission
public final String toString()
target
's name
also.toString
in class Permission
public final String getPureName()
toString()
public final Principal getTarget()
public final int hashCode()
hashCode
in class Permission
public final boolean equals(Object other)
equals
in class Permission
hashCode()
,
asLowerString
public String invoke()
ACLentry
.REFUSED
, if the
target
is not of type Permit.Operable
. If this permission
was taken from a negative or prohibition list (see. ACLentry
),
this method should not be called.target
.clientOrder
(pureName)
will be called and the
result (including Exceptions if any) will just be forwarded to this
method's caller.