Java Doc for PolicyConfiguration.java in  » EJB-Server-JBoss-4.2.1 » j2ee » javax » security » jacc » 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 » EJB Server JBoss 4.2.1 » j2ee » javax.security.jacc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.security.jacc.PolicyConfiguration

PolicyConfiguration
public interface PolicyConfiguration (Code)
The methods of this interface are used by containers to create policy statements in a Policy provider. An object that implements the PolicyConfiguration interface provides the policy statement configuration interface for a corresponding policy context within the corresponding Policy provider. The life cycle of a policy context is defined by three states; "open", "inService", and "deleted". A policy context is in one of these three states. A policy context in the "open" state is in the process of being configured, and may be operated on by any of the methods of the PolicyConfiguration interface. A policy context in the "open" state must not be assimilated at Policy.refresh into the policy statements used by the Policy provider in performing its access decisions. In order for the policy statements of a policy context to be assimilated by the associated provider, the policy context must be in the "inService" state. A policy context in the "open" state is transitioned to the "inService" state by calling the commit method. A policy context in the "inService" state is available for assimilation into the policy statements being used to perform access decisions by the associated Policy provider. Providers assimilate policy contexts containing policy statements when the refresh method of the provider is called. When a provider's refresh method is called, it must assimilate only those policy contexts whose state is "inService" and it must ensure that the policy statements put into service for each policy context are only those defined in the context at the time of the call to refresh. A policy context in the "inService" state is not available for additional configuration and may be returned to the "open" state by calling the getPolicyConfiguration method of the PolicyConfigurationFactory. A policy context in the "deleted" state is neither available for configuration, nor is it available for assimilation into the Provider. A policy context whose state is "deleted" may be reclaimed for subsequent processing by calling the getPolicyConfiguration method of the associated PolicyConfigurationFactory. A "deleted" policy context is transitioned to the "open" state when it it returned as a result of a call to getPolicyConfiguration. The following table captures the correspondence between the policy context life cycle and the methods of the PolicyConfiguration interface. The rightmost 3 columns of the table correspond to the PolicyConfiguration state identified at the head of the column. The values in the cells of these columns indicate the next state resulting from a call to the method identifed in the leftmost column of the corresponding row, or that calling the method is unsupported in the state represented by the column (in which case the state will remain unchanged).
PolicyConfiguration State Table
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.
See Also:    http://java.sun.com/j2ee/1.4/docs/api/
author:
   Scott.Stark@jboss.org
author:
   Ron Monzillo, Gary Ellison (javadoc)
version:
   $Revision: 57196 $




Method Summary
public  voidaddToExcludedPolicy(Permission permission)
     Adds a single excluded permission to the PolicyConfiguration.
public  voidaddToExcludedPolicy(PermissionCollection permissions)
    
public  voidaddToRole(String roleName, Permission permission)
     Add a single permission to a named role in the PolicyConfiguration.
public  voidaddToRole(String roleName, PermissionCollection permissions)
     Add permissions to a named role in the PolicyConfiguration.
public  voidaddToUncheckedPolicy(Permission permission)
     Add a single unchecked permission to the PolicyConfiguration.
public  voidaddToUncheckedPolicy(PermissionCollection permissions)
     Add unchecked permissions to the PolicyConfiguration.
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. This operation has no affect on any linked PolicyConfigurations other than removing any links involving the deleted PolicyConfiguration.
public  StringgetContextID()
     This method returns this object's policy context identifier.
public  booleaninService()
     This method is used to determine if the policy context whose interface is this PolicyConfiguration Object is in the "inService" state.
public  voidlinkConfiguration(PolicyConfiguration link)
     Creates a relationship between this configuration and another such that they share the same principal-to-role mappings.
public  voidremoveExcludedPolicy()
    
public  voidremoveRole(String roleName)
     Used to remove a role and all its permissions from this PolicyConfiguration.
public  voidremoveUncheckedPolicy()
     Used to remove any unchecked policy statements from this PolicyConfiguration.



Method Detail
addToExcludedPolicy
public void addToExcludedPolicy(Permission permission) throws PolicyContextException(Code)
Adds a single excluded permission to the PolicyConfiguration.
Parameters:
  permission -
throws:
  PolicyContextException -



addToExcludedPolicy
public void addToExcludedPolicy(PermissionCollection permissions) throws PolicyContextException(Code)
Adds a collection of excluded permissions to the PolicyConfiguration
Parameters:
  permissions -
throws:
  PolicyContextException -



addToRole
public void addToRole(String roleName, Permission permission) throws PolicyContextException(Code)
Add a single permission to a named role in the PolicyConfiguration. If the named Role does not exist in the PolicyConfiguration, it is created as a result of the call to this function.
Parameters:
  roleName -
Parameters:
  permission -
throws:
  PolicyContextException -



addToRole
public void addToRole(String roleName, PermissionCollection permissions) throws PolicyContextException(Code)
Add permissions to a named role in the PolicyConfiguration. If the named Role does not exist in the PolicyConfiguration, it is created as a result of the call to this function.
Parameters:
  roleName -
Parameters:
  permissions -
throws:
  PolicyContextException -



addToUncheckedPolicy
public void addToUncheckedPolicy(Permission permission) throws PolicyContextException(Code)
Add a single unchecked permission to the PolicyConfiguration.
Parameters:
  permission -
throws:
  PolicyContextException -



addToUncheckedPolicy
public void addToUncheckedPolicy(PermissionCollection permissions) throws PolicyContextException(Code)
Add unchecked permissions to the PolicyConfiguration.
Parameters:
  permissions -
throws:
  PolicyContextException -



commit
public void commit() throws PolicyContextException(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 - - when the caller does not have aSecurityPermission("setPolicy") permission.
throws:
  UnsupportedOperationException - - if the state of the policy contextwhose interface is this PolicyConfiguration Object is "deleted" when thismethod is called.
throws:
  PolicyContextException - - if the implementation throws a checkedexception that has not been accounted for by the commit method signature.



delete
public void delete() throws PolicyContextException(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 - - when the caller does not have aSecurityPermission("setPolicy") permission.
throws:
  PolicyContextException -



getContextID
public String getContextID() throws PolicyContextException(Code)
This method returns this object's policy context identifier. this object's policy context identifier.
throws:
  SecurityException - - when the caller does not have aSecurityPermission("setPolicy") permission.
throws:
  PolicyContextException -



inService
public boolean inService() throws PolicyContextException(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:
  PolicyContextException -



linkConfiguration
public void linkConfiguration(PolicyConfiguration link) throws PolicyContextException(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.
Parameters:
  link - - a reference to a different PolicyConfiguration than thisPolicyConfiguration. The relationship formed by this method is symetric,transitive and idempotent. If the argument PolicyConfiguration does nothave a different Policy context identifier than this PolicyConfigurationno relationship is formed, and an IllegalArgumentException is thrown.
throws:
  SecurityException - - when the caller does not have aSecurityPermission("setPolicy") permission.
throws:
  IllegalArgumentException - - if called with an argumentPolicyConfiguration whose Policy context is equivalent to that of thisPolicyConfiguration.
throws:
  PolicyContextException -



removeExcludedPolicy
public void removeExcludedPolicy() throws PolicyContextException(Code)
Used to remove any excluded policy statements from this PolicyConfiguration
throws:
  SecurityException - - when the caller does not have aSecurityPermission("setPolicy") permission.
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 -



removeRole
public void removeRole(String roleName) throws PolicyContextException(Code)
Used to remove a role and all its permissions from this PolicyConfiguration.
Parameters:
  roleName - - the name of the Role to remove from this PolicyConfiguration.
throws:
  SecurityException - - when the caller does not have aSecurityPermission("setPolicy") permission.
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 -



removeUncheckedPolicy
public void removeUncheckedPolicy() throws PolicyContextException(Code)
Used to remove any unchecked policy statements from this PolicyConfiguration.
throws:
  SecurityException - - when the caller does not have aSecurityPermission("setPolicy") permission.
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 -



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