|
Préférences
Moteurs de recherche
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
JavaTM Platform, Enterprise Edition, v 5.0
javax.security.jacc
|
Method | Current State to Next State | ||
---|---|---|---|
deleted | open | inService | |
addToExcludedPolicy | Unsupported Operation | open | Unsupported Operation |
addToRole | Unsupported Operation | open | Unsupported Operation |
addToUncheckedPolicy | Unsupported Operation | open | Unsupported Operation |
commit | Unsupported Operation | inService | inService |
delete | deleted | deleted | deleted |
getContextID | deleted | open | inService |
inService | deleted | open | inService |
linkConfiguration | Unsupported Operation | open | Unsupported Operation |
removeExcludedPolicy | Unsupported Operation | open | Unsupported Operation |
removeRole | Unsupported Operation | open | Unsupported Operation |
removeUncheckedPolicy | Unsupported Operation | open | Unsupported Operation |
For a provider implementation to be compatible with multi-threaded environments, it may be necessary to synchronize the refresh method of the provider with the methods of its PolicyConfiguration interface and with the getPolicyConfiguration and inService methods of its PolicyConfigurationFactory.
Permission
,
PermissionCollection
,
PolicyContextException
,
PolicyConfigurationFactory
Method Summary | |
---|---|
void |
addToExcludedPolicy(Permission permission)
Used to add a single excluded policy statement to this PolicyConfiguration. |
void |
addToExcludedPolicy(PermissionCollection permissions)
Used to add excluded policy statements to this PolicyConfiguration. |
void |
addToRole(String roleName,
Permission permission)
Used to add a single permission to a named role in this PolicyConfiguration. |
void |
addToRole(String roleName,
PermissionCollection permissions)
Used to add permissions to a named role in this PolicyConfiguration. |
void |
addToUncheckedPolicy(Permission permission)
Used to add a single unchecked policy statement to this PolicyConfiguration. |
void |
addToUncheckedPolicy(PermissionCollection permissions)
Used to add unchecked policy statements to this PolicyConfiguration. |
void |
commit()
This method is used to set to "inService" the state of the policy context whose interface is this PolicyConfiguration Object. |
void |
delete()
Causes all policy statements to be deleted from this PolicyConfiguration and sets its internal state such that calling any method, other than delete, getContextID, or inService on the PolicyConfiguration will be rejected and cause an UnsupportedOperationException to be thrown. |
String |
getContextID()
This method returns this object's policy context identifier. |
boolean |
inService()
This method is used to determine if the policy context whose interface is this PolicyConfiguration Object is in the "inService" state. |
void |
linkConfiguration(PolicyConfiguration link)
Creates a relationship between this configuration and another such that they share the same principal-to-role mappings. |
void |
removeExcludedPolicy()
Used to remove any excluded policy statements from this PolicyConfiguration. |
void |
removeRole(String roleName)
Used to remove a role and all its permissions from this PolicyConfiguration. |
void |
removeUncheckedPolicy()
Used to remove any unchecked policy statements from this PolicyConfiguration. |
Method Detail |
---|
String getContextID() throws PolicyContextException
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the getContextID method signature. The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.void addToRole(String roleName, PermissionCollection permissions) throws PolicyContextException
It is the job of the Policy provider to ensure that all the permissions added to a role are granted to principals "mapped to the role".
roleName
- the name of the Role to which the permissions are
to be added.
permissions
- the collection of permissions to be added
to the role. The collection may be either a homogenous or
heterogenous collection.
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
UnsupportedOperationException
- if the state of the policy context whose interface is this
PolicyConfiguration Object is "deleted" or "inService" when this
method is called.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the addToRole method signature. The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.void addToRole(String roleName, Permission permission) throws PolicyContextException
It is the job of the Policy provider to ensure that all the permissions added to a role are granted to principals "mapped to the role".
roleName
- the name of the Role to which the permission is
to be added.
permission
- the permission to be added
to the role.
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
UnsupportedOperationException
- if the state of the policy context whose interface is this
PolicyConfiguration Object is "deleted" or "inService" when this
method is called.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the addToRole method signature. The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.void addToUncheckedPolicy(PermissionCollection permissions) throws PolicyContextException
permissions
- the collection of permissions to be added
as unchecked policy statements. The collection may be either
a homogenous or heterogenous collection.
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
UnsupportedOperationException
- if the state of the policy context whose interface is this
PolicyConfiguration Object is "deleted" or "inService" when this
method is called.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the addToUncheckedPolicy method signature.
The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.void addToUncheckedPolicy(Permission permission) throws PolicyContextException
permission
- the permission to be added
to the unchecked policy statements.
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
UnsupportedOperationException
- if the state of the policy context whose interface is this
PolicyConfiguration Object is "deleted" or "inService" when this
method is called.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the addToUncheckedPolicy method signature.
The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.void addToExcludedPolicy(PermissionCollection permissions) throws PolicyContextException
permissions
- the collection of permissions to be added
to the excluded policy statements. The collection may be either
a homogenous or heterogenous collection.
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
UnsupportedOperationException
- if the state of the policy context whose interface is this
PolicyConfiguration Object is "deleted" or "inService" when this
method is called.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the addToExcludedPolicy method signature.
The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.void addToExcludedPolicy(Permission permission) throws PolicyContextException
permission
- the permission to be added
to the excluded policy statements.
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
UnsupportedOperationException
- if the state of the policy context whose interface is this
PolicyConfiguration Object is "deleted" or "inService" when this
method is called.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the addToExcludedPolicy method signature.
The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.void removeRole(String roleName) throws PolicyContextException
roleName
- the name of the Role to remove from this
PolicyConfiguration.
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
UnsupportedOperationException
- if the state of the policy context whose interface is this
PolicyConfiguration Object is "deleted" or "inService" when this
method is called.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the removeRole method signature. The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.void removeUncheckedPolicy() throws PolicyContextException
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
UnsupportedOperationException
- if the state of the policy context whose interface is this
PolicyConfiguration Object is "deleted" or "inService" when this
method is called.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the removeUncheckedPolicy method signature.
The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.void removeExcludedPolicy() throws PolicyContextException
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
UnsupportedOperationException
- if the state of the policy context whose interface is this
PolicyConfiguration Object is "deleted" or "inService" when this
method is called.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the removeExcludedPolicy method signature.
The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.void linkConfiguration(PolicyConfiguration link) throws PolicyContextException
Note that the policy statements which comprise a role, or comprise the excluded or unchecked policy collections in a PolicyConfiguration are unaffected by the configuration being linked to another.
link
- a reference to a different PolicyConfiguration than this
PolicyConfiguration.
The relationship formed by this method is symetric, transitive and idempotent. If the argument PolicyConfiguration does not have a different Policy context identifier than this PolicyConfiguration no relationship is formed, and an exception, as described below, is thrown.
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
UnsupportedOperationException
- if the state of the policy context whose interface is this
PolicyConfiguration Object is "deleted" or "inService" when this
method is called.
IllegalArgumentException
- if called with an argument PolicyConfiguration whose Policy context
is equivalent to that of this PolicyConfiguration.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the linkConfiguration method signature. The exception
thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.void delete() throws PolicyContextException
This operation has no affect on any linked PolicyConfigurations other than removing any links involving the deleted PolicyConfiguration.
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the delete method signature. The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.void commit() throws PolicyContextException
When the state of a policy context is "inService", calling any method other than commit, delete, getContextID, or inService on its PolicyConfiguration Object will cause an UnsupportedOperationException to be thrown.
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
UnsupportedOperationException
- if the state of the policy context whose interface is this
PolicyConfiguration Object is "deleted" when this
method is called.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the commit method signature. The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.boolean inService() throws PolicyContextException
SecurityException
- if called by an AccessControlContext that has not been
granted the "setPolicy" SecurityPermission.
PolicyContextException
- if the implementation throws a checked exception that has not been
accounted for by the inService method signature. The exception thrown
by the implementation class will be encapsulated (during construction)
in the thrown PolicyContextException.