Java Doc for JPolicyConfiguration.java in  » J2EE » ow2-easybeans » org » ow2 » easybeans » security » jacc » provider » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » ow2 easybeans » org.ow2.easybeans.security.jacc.provider 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.ow2.easybeans.security.jacc.provider.JPolicyConfiguration

JPolicyConfiguration
public class JPolicyConfiguration implements PolicyConfiguration(Code)
Defines the PolicyConfiguration implementation class of JACC.
author:
   Florent Benoit



Constructor Summary
public  JPolicyConfiguration(String contextID)
     Constructor of a new PolicyConfiguration object.

Method Summary
public  voidaddToExcludedPolicy(Permission permission)
     Used to add a single excluded policy statement to this PolicyConfiguration.
Parameters:
  permission - the permission to be added to the excluded policystatements.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by theaddToExcludedPolicy method signature.
public  voidaddToExcludedPolicy(PermissionCollection permissions)
     Used to add excluded policy statements to this PolicyConfiguration.
Parameters:
  permissions - the collection of permissions to be added to theexcluded policy statements.
public  voidaddToRole(String roleName, Permission permission)
     Used to add a single permission to a named role in this PolicyConfiguration.
Parameters:
  roleName - the name of the Role to which the permission is to beadded.
Parameters:
  permission - the permission to be added to the role.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - - if the implementation throws a checkedexception that has not been accounted for by the addToRole methodsignature.
public  voidaddToRole(String roleName, PermissionCollection permissions)
     Used to add permissions to a named role in this PolicyConfiguration.
Parameters:
  roleName - the name of the Role to which the permissions are to beadded.
Parameters:
  permissions - the collection of permissions to be added to the role.The collection may be either a homogenous or heterogenouscollection.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or inService" when this method is called.
throws:
  PolicyContextException - - if the implementation throws a checkedexception that has not been accounted for by the addToRole methodsignature.
public  voidaddToUncheckedPolicy(Permission permission)
     Used to add a single unchecked policy statement to this PolicyConfiguration.
Parameters:
  permission - the permission to be added to the unchecked policystatements.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by theaddToUncheckedPolicy method signature.
public  voidaddToUncheckedPolicy(PermissionCollection permissions)
     Used to add unchecked policy statements to this PolicyConfiguration.
Parameters:
  permissions - the collection of permissions to be added as uncheckedpolicy statements.
public  voidcommit()
     This method is used to set to "inService" the state of the policy context whose interface is this PolicyConfiguration Object.
public  voiddelete()
     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.
public  booleanequals(Object obj)
     Indicates whether some other object is "equal to" this one.
Parameters:
  obj - the reference object with which to compare.
public  StringgetContextID()
     This method returns this object's policy context identifier. this object's policy context identifier.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by the getContextIDmethod signature.
public  PermissionCollectiongetExcludedPermissions()
     Gets the excluded permission.
public  PermissionCollectiongetPermissionsForPrincipal(Principal principal)
     Gets the permissions for a given principal.
public  PermissionCollectiongetUncheckedPermissions()
     Gets the excluded permission.
public  inthashCode()
     Gets a hash code value for the object.
public  booleaninService()
     This method is used to determine if the policy context whose interface is this PolicyConfiguration Object is in the "inService" state. true if the state of the associated policy context is"inService"; false otherwise.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by the inService methodsignature.
public  voidlinkConfiguration(PolicyConfiguration link)
     Creates a relationship between this configuration and another such that they share the same principal-to-role mappings.
public  voidremoveExcludedPolicy()
     Used to remove any excluded policy statements from this PolicyConfiguration.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by theremoveExcludedPolicy method signature.
public  voidremoveRole(String roleName)
     Used to remove a role and all its permissions from this PolicyConfiguration.
Parameters:
  roleName - the name of the Role to remove from thisPolicyConfiguration.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by the removeRolemethod signature.
public  voidremoveUncheckedPolicy()
     Used to remove any unchecked policy statements from this PolicyConfiguration.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by theremoveUncheckedPolicy method signature.
protected  voidresetState()
     Reset to OPEN state (Used by PolicyConfigurationFactory).


Constructor Detail
JPolicyConfiguration
public JPolicyConfiguration(String contextID)(Code)
Constructor of a new PolicyConfiguration object.
Parameters:
  contextID - Identifier of this PolicyConfiguration object




Method Detail
addToExcludedPolicy
public void addToExcludedPolicy(Permission permission) throws PolicyContextException, SecurityException, UnsupportedOperationException(Code)
Used to add a single excluded policy statement to this PolicyConfiguration.
Parameters:
  permission - the permission to be added to the excluded policystatements.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by theaddToExcludedPolicy method signature. The exception thrown by theimplementation class will be encapsulated (during construction)in the thrown PolicyContextException.



addToExcludedPolicy
public void addToExcludedPolicy(PermissionCollection permissions) throws PolicyContextException, SecurityException, UnsupportedOperationException(Code)
Used to add excluded policy statements to this PolicyConfiguration.
Parameters:
  permissions - the collection of permissions to be added to theexcluded policy statements. The collection may be either ahomogenous or heterogenous collection.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by theaddToExcludedPolicy method signature. The exception thrown by theimplementation class will be encapsulated (during construction)in the thrown PolicyContextException.



addToRole
public void addToRole(String roleName, Permission permission) throws PolicyContextException, SecurityException, UnsupportedOperationException(Code)
Used to add a single permission to a named role in this PolicyConfiguration.
Parameters:
  roleName - the name of the Role to which the permission is to beadded.
Parameters:
  permission - the permission to be added to the role.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - - if the implementation throws a checkedexception that has not been accounted for by the addToRole methodsignature. The exception thrown by the implementation class willbe encapsulated (during construction) in the thrownPolicyContextException.



addToRole
public void addToRole(String roleName, PermissionCollection permissions) throws PolicyContextException, SecurityException, UnsupportedOperationException(Code)
Used to add permissions to a named role in this PolicyConfiguration.
Parameters:
  roleName - the name of the Role to which the permissions are to beadded.
Parameters:
  permissions - the collection of permissions to be added to the role.The collection may be either a homogenous or heterogenouscollection.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or inService" when this method is called.
throws:
  PolicyContextException - - if the implementation throws a checkedexception that has not been accounted for by the addToRole methodsignature. The exception thrown by the implementation class willbe encapsulated (during construction) in the thrownPolicyContextException.



addToUncheckedPolicy
public void addToUncheckedPolicy(Permission permission) throws PolicyContextException, SecurityException, UnsupportedOperationException(Code)
Used to add a single unchecked policy statement to this PolicyConfiguration.
Parameters:
  permission - the permission to be added to the unchecked policystatements.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by theaddToUncheckedPolicy method signature. The exception thrown bythe implementation class will be encapsulated (duringconstruction) in the thrown PolicyContextException.



addToUncheckedPolicy
public void addToUncheckedPolicy(PermissionCollection permissions) throws PolicyContextException, SecurityException, UnsupportedOperationException(Code)
Used to add unchecked policy statements to this PolicyConfiguration.
Parameters:
  permissions - the collection of permissions to be added as uncheckedpolicy statements. The collection may be either a homogenous orheterogenous collection.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by theaddToUncheckedPolicy method signature. The exception thrown bythe implementation class will be encapsulated (duringconstruction) in the thrown PolicyContextException.



commit
public void commit() throws PolicyContextException, SecurityException, UnsupportedOperationException(Code)
This method is used to set to "inService" the state of the policy context whose interface is this PolicyConfiguration Object. Only those policy contexts whose state is "inService" will be included in the policy contexts processed by the Policy.refresh method. A policy context whose state is "inService" may be returned to the "open" state by calling the getPolicyConfiguration method of the PolicyConfiguration factory with the policy context identifier of the policy context. 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.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by the commit methodsignature. The exception thrown by the implementation class willbe encapsulated (during construction) in the thrownPolicyContextException.



delete
public void delete() throws PolicyContextException, SecurityException(Code)
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. This operation has no affect on any linked PolicyConfigurations other than removing any links involving the deleted PolicyConfiguration.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by the delete methodsignature. The exception thrown by the implementation class willbe encapsulated (during construction) in the thrownPolicyContextException.



equals
public boolean equals(Object obj)(Code)
Indicates whether some other object is "equal to" this one.
Parameters:
  obj - the reference object with which to compare. true if this object is the same as the obj argument; falseotherwise.



getContextID
public String getContextID() throws PolicyContextException, SecurityException(Code)
This method returns this object's policy context identifier. this object's policy context identifier.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by the getContextIDmethod signature. The exception thrown by the implementationclass will be encapsulated (during construction) in the thrownPolicyContextException.



getExcludedPermissions
public PermissionCollection getExcludedPermissions()(Code)
Gets the excluded permission. the excluded permission



getPermissionsForPrincipal
public PermissionCollection getPermissionsForPrincipal(Principal principal)(Code)
Gets the permissions for a given principal.
Parameters:
  principal - given principal the permissions for a given principal



getUncheckedPermissions
public PermissionCollection getUncheckedPermissions()(Code)
Gets the excluded permission. the excluded permission



hashCode
public int hashCode()(Code)
Gets a hash code value for the object. a hash code value for this object.



inService
public boolean inService() throws PolicyContextException, SecurityException(Code)
This method is used to determine if the policy context whose interface is this PolicyConfiguration Object is in the "inService" state. true if the state of the associated policy context is"inService"; false otherwise.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by the inService methodsignature. The exception thrown by the implementation class willbe encapsulated (during construction) in the thrownPolicyContextException.



linkConfiguration
public void linkConfiguration(PolicyConfiguration link) throws IllegalArgumentException, PolicyContextException, SecurityException, UnsupportedOperationException(Code)
Creates a relationship between this configuration and another such that they share the same principal-to-role mappings. PolicyConfigurations are linked to apply a common principal-to-role mapping to multiple seperately manageable PolicyConfigurations, as is required when an application is composed of multiple modules. 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.
Parameters:
  link - a reference to a different PolicyConfiguration than thisPolicyConfiguration. The relationship formed by this method issymetric, transitive and idempotent. If the argumentPolicyConfiguration does not have a different Policy contextidentifier than this PolicyConfiguration no relationship isformed, and an exception, as described below, is thrown.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  IllegalArgumentException - if called with an argumentPolicyConfiguration whose Policy context is equivalent to that ofthis PolicyConfiguration.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by thelinkConfiguration method signature. The exception thrown by theimplementation class will be encapsulated (during construction)in the thrown PolicyContextException.



removeExcludedPolicy
public void removeExcludedPolicy() throws PolicyContextException, SecurityException, UnsupportedOperationException(Code)
Used to remove any excluded policy statements from this PolicyConfiguration.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by theremoveExcludedPolicy method signature. The exception thrown bythe implementation class will be encapsulated (duringconstruction) in the thrown PolicyContextException.



removeRole
public void removeRole(String roleName) throws PolicyContextException, SecurityException, UnsupportedOperationException(Code)
Used to remove a role and all its permissions from this PolicyConfiguration.
Parameters:
  roleName - the name of the Role to remove from thisPolicyConfiguration.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by the removeRolemethod signature. The exception thrown by the implementationclass will be encapsulated (during construction) in the thrownPolicyContextException.



removeUncheckedPolicy
public void removeUncheckedPolicy() throws PolicyContextException, SecurityException, UnsupportedOperationException(Code)
Used to remove any unchecked policy statements from this PolicyConfiguration.
throws:
  SecurityException - if called by an AccessControlContext that hasnot been granted the "setPolicy" SecurityPermission.
throws:
  UnsupportedOperationException - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted"or "inService" when this method is called.
throws:
  PolicyContextException - if the implementation throws a checkedexception that has not been accounted for by theremoveUncheckedPolicy method signature. The exception thrown bythe implementation class will be encapsulated (duringconstruction) in the thrown PolicyContextException.



resetState
protected void resetState()(Code)
Reset to OPEN state (Used by PolicyConfigurationFactory).



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.