public interface ConditionalPermissionInfo
Modifier and Type | Field and Description |
---|---|
static String |
ALLOW
This string is used to indicate that a row in the Conditional Permission
Table should return an access decision of "allow" if the
conditions are all satisfied and at least one of the permissions is
implied.
|
static String |
DENY
This string is used to indicate that a row in the Conditional Permission
Table should return an access decision of "deny" if the
conditions are all satisfied and at least one of the permissions is
implied.
|
Modifier and Type | Method and Description |
---|---|
void |
delete()
Deprecated.
Since 1.1. Use
ConditionalPermissionAdmin.newConditionalPermissionUpdate()
instead to manage the Conditional Permissions. |
boolean |
equals(Object obj)
Determines the equality of two
ConditionalPermissionInfo
objects. |
String |
getAccessDecision()
Returns the access decision for this Conditional Permission Info.
|
ConditionInfo[] |
getConditionInfos()
Returns the Condition Infos for the Conditions that must be satisfied to
enable the Permissions.
|
String |
getEncoded()
Returns the string encoding of this
ConditionalPermissionInfo in a form suitable for restoring
this ConditionalPermissionInfo . |
String |
getName()
Returns the name of this Conditional Permission Info.
|
PermissionInfo[] |
getPermissionInfos()
Returns the Permission Infos for the Permissions in this Conditional
Permission Info.
|
int |
hashCode()
Returns the hash code value for this object.
|
String |
toString()
Returns the string representation of this
ConditionalPermissionInfo . |
static final String ALLOW
static final String DENY
ConditionInfo[] getConditionInfos()
PermissionInfo[] getPermissionInfos()
void delete()
ConditionalPermissionAdmin.newConditionalPermissionUpdate()
instead to manage the Conditional Permissions.
Since this method changes the underlying permission table, any
ConditionalPermissionUpdate
s that were created prior to calling
this method can no longer be committed.
UnsupportedOperationException
- If this object was created by
ConditionalPermissionAdmin.newConditionalPermissionInfo(java.lang.String, org.osgi.service.condpermadmin.ConditionInfo[], org.osgi.service.permissionadmin.PermissionInfo[], java.lang.String)
or obtained from a ConditionalPermissionUpdate
. This
method only functions if this object was obtained from one of the
ConditionalPermissionAdmin
methods deprecated in version
1.1.SecurityException
- If the caller does not have
AllPermission
.String getName()
null
if this Conditional Permission Info was created
without a name.String getAccessDecision()
String getEncoded()
ConditionalPermissionInfo
in a form suitable for restoring
this ConditionalPermissionInfo
.
The encoded format is:
access {conditions permissions} namewhere access is the access decision, conditions is zero or more
encoded conditions
,
permissions is one or more encoded permissions
and name is the name of the
ConditionalPermissionInfo
.
name is optional. If name is present in the encoded string,
it must quoted, beginning and ending with "
. The
name value must be encoded for proper parsing. Specifically, the
"
, \
, carriage return, and line feed
characters must be escaped using \"
, \\
,
\r
, and \n
, respectively.
The encoded string contains no leading or trailing whitespace characters.
A single space character is used between access and {
and between }
and name, if name is present.
All encoded conditions and permissions are separated by a single space
character.
ConditionalPermissionInfo
.String toString()
ConditionalPermissionInfo
. The string is created by calling
the getEncoded
method on this
ConditionalPermissionInfo
.boolean equals(Object obj)
ConditionalPermissionInfo
objects.
This method checks that specified object has the same access decision,
conditions, permissions and name as this
ConditionalPermissionInfo
object.equals
in class Object
obj
- The object to test for equality with this
ConditionalPermissionInfo
object.true
if obj
is a
ConditionalPermissionInfo
, and has the same access
decision, conditions, permissions and name as this
ConditionalPermissionInfo
object; false
otherwise.Copyright © 2018 JBoss by Red Hat. All rights reserved.