|
OSGi™ Core Release 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@ProviderType public interface ConditionalPermissionAdmin
Framework service to administer Conditional Permissions. Conditional Permissions can be added to, retrieved from, and removed from the framework. Conditional Permissions are conceptually managed in an ordered table called the Conditional Permission Table.
Method Detail |
---|
ConditionalPermissionInfo addConditionalPermissionInfo(ConditionInfo[] conditions, PermissionInfo[] permissions)
newConditionalPermissionUpdate()
instead.
The Conditional Permission Info will be given a unique, never reused
name. This entry will be added at the beginning of the Conditional
Permission Table with an access decision of
ALLOW
.
Since this method changes the Conditional Permission Table any
ConditionalPermissionUpdate
s that were created prior to calling
this method can no longer be committed.
conditions
- The conditions that need to be satisfied to enable the
specified permissions. This argument can be null
or an
empty array indicating the specified permissions are not guarded
by any conditions.permissions
- The permissions that are enabled when the specified
conditions, if any, are satisfied. This argument must not be
null
and must specify at least one permission.
IllegalArgumentException
- If no permissions are specified.
SecurityException
- If the caller does not have
AllPermission
.ConditionalPermissionInfo setConditionalPermissionInfo(String name, ConditionInfo[] conditions, PermissionInfo[] permissions)
newConditionalPermissionUpdate()
instead.
If the specified name is null
, a new Conditional Permission Info
must be created and will be given a unique, never reused name. If there
is currently no Conditional Permission Info with the specified name, a
new Conditional Permission Info must be created with the specified name.
Otherwise, the Conditional Permission Info with the specified name must
be updated with the specified Conditions and Permissions. If a new entry
was created in the Conditional Permission Table it will be added at the
beginning of the table with an access decision of
ALLOW
.
Since this method changes the underlying permission table any
ConditionalPermissionUpdate
s that were created prior to calling
this method can no longer be committed.
name
- The name of the Conditional Permission Info, or null
.conditions
- The conditions that need to be satisfied to enable the
specified permissions. This argument can be null
or an
empty array indicating the specified permissions are not guarded
by any conditions.permissions
- The permissions that are enabled when the specified
conditions, if any, are satisfied. This argument must not be
null
and must specify at least one permission.
IllegalArgumentException
- If no permissions are specified.
SecurityException
- If the caller does not have
AllPermission
.Enumeration<ConditionalPermissionInfo> getConditionalPermissionInfos()
newConditionalPermissionUpdate()
instead.
The returned Enumeration will return elements in the order they are kept in the Conditional Permission Table.
The Enumeration returned is based on a copy of the Conditional Permission Table and therefore will not throw exceptions if the Conditional Permission Table is changed during the course of reading elements from the Enumeration.
ConditionalPermissionInfo getConditionalPermissionInfo(String name)
newConditionalPermissionUpdate()
instead.
name
- The name of the Conditional Permission Info to be returned.
null
if no Conditional Permission Info with the specified
name exists in the Conditional Permission Table.AccessControlContext getAccessControlContext(String[] signers)
IllegalStateException
because the
state is UNINSTALLEDnull
signers
- The signers for which to return an Access Control Context.
AccessControlContext
that has the Permissions
associated with the signer.ConditionalPermissionUpdate newConditionalPermissionUpdate()
ConditionalPermissionInfo newConditionalPermissionInfo(String name, ConditionInfo[] conditions, PermissionInfo[] permissions, String access)
ConditionalPermissionUpdate
. The
delete
method on ConditionalPermissionInfo
objects
created with this method must throw UnsupportedOperationException.
name
- The name of the created ConditionalPermissionInfo
or
null
to have a unique name generated when the returned
ConditionalPermissionInfo
is committed in an update to the
Conditional Permission Table.conditions
- The conditions that need to be satisfied to enable the
specified permissions. This argument can be null
or an
empty array indicating the specified permissions are not guarded
by any conditions.permissions
- The permissions that are enabled when the specified
conditions, if any, are satisfied. This argument must not be
null
and must specify at least one permission.access
- Access decision. Must be one of the following values:
The specified access decision value must be evaluated case
insensitively.
ConditionalPermissionInfo
object suitable for insertion
into a ConditionalPermissionUpdate
.
IllegalArgumentException
- If no permissions are specified or if
the specified access decision is not a valid value.ConditionalPermissionInfo newConditionalPermissionInfo(String encodedConditionalPermissionInfo)
ConditionalPermissionInfo
from the specified
encoded ConditionalPermissionInfo
string suitable for insertion
into a ConditionalPermissionUpdate
. The delete
method on
ConditionalPermissionInfo
objects created with this method must
throw UnsupportedOperationException.
encodedConditionalPermissionInfo
- The encoded
ConditionalPermissionInfo
. White space in the encoded
ConditionalPermissionInfo
is ignored. The access decision
value in the encoded ConditionalPermissionInfo
must be
evaluated case insensitively. If the encoded
ConditionalPermissionInfo
does not contain the optional
name, null
must be used for the name and a unique name
will be generated when the returned
ConditionalPermissionInfo
is committed in an update to the
Conditional Permission Table.
ConditionalPermissionInfo
object suitable for insertion
into a ConditionalPermissionUpdate
.
IllegalArgumentException
- If the specified
encodedConditionalPermissionInfo
is not properly
formatted.ConditionalPermissionInfo.getEncoded()
|
OSGi™ Core Release 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |