Java Doc for PermissionManager.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas » web » lib » 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 » JOnAS 4.8.6 » org.objectweb.jonas.web.lib 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.objectweb.jonas_lib.security.AbsPermissionManager
      org.objectweb.jonas.web.lib.PermissionManager

PermissionManager
public class PermissionManager extends AbsPermissionManager (Code)
Defines a PermissionManager class which will manage JACC permissions for a web-app
author:
   Florent Benoit



Constructor Summary
public  PermissionManager(WebContainerDeploymentDesc webContainerDeploymentDesc, String contextId, boolean remove)
    

Method Summary
public  booleancheckWebResourcePermission(HttpServletRequest request, String principalName, String[] roles)
    
public  booleancheckWebRoleRefPermission(HttpServletRequest request, String servletName, String principalName, String[] roles, String roleName)
    
public  booleancheckWebUserDataPermission(HttpServletRequest request, String principalName, String[] roles)
    
protected  voidresetDeploymentDesc()
    
protected  voidtranslateSecurityConstraintElements()
     3.1.3.1 Translating security-constraint elements The paragraphs of this section describe the translation of security-constraints into WebResourcePermission and WebUserDataPermission objects constructed using qualified URL pattern names.
public  voidtranslateServletDeploymentDescriptor()
     3.1.3.Translating Servlet Deployment Descriptors A reference to a PolicyConfiguration object must be obtained by calling the getPolicyConfiguration method on the PolicyConfigurationFactory implementation class of the provider configured into the container.
protected  voidtranslateServletSecurityRoleRef()
     3.1.3.2 Translating Servlet security-role-ref Elements For each security-role-ref appearing in the deployment descriptor a corresponding WebRoleRefPermission must be added to the corresponding role.


Constructor Detail
PermissionManager
public PermissionManager(WebContainerDeploymentDesc webContainerDeploymentDesc, String contextId, boolean remove) throws PermissionManagerException(Code)
Default Constructor
Parameters:
  webContainerDeploymentDesc - EJB deployment Descriptor
Parameters:
  contextId - context ID used for PolicyContext
Parameters:
  remove - - remove the policy context when creating a new one.
throws:
  PermissionManagerException - if permissions can't be set




Method Detail
checkWebResourcePermission
public boolean checkWebResourcePermission(HttpServletRequest request, String principalName, String[] roles)(Code)
Check the security for a given HttpServletReauest
Parameters:
  request - the http servlet request
Parameters:
  principalName - name of the principal
Parameters:
  roles - array of roles for this permission true if the permission is granted, else false



checkWebRoleRefPermission
public boolean checkWebRoleRefPermission(HttpServletRequest request, String servletName, String principalName, String[] roles, String roleName)(Code)
Check the security for a given HttpServletReauest
Parameters:
  request - the http servlet request
Parameters:
  servletName - Name of the servlet
Parameters:
  principalName - name of the principal
Parameters:
  roles - array of roles for this permission
Parameters:
  roleName - name of the role true if the permission is granted, else false



checkWebUserDataPermission
public boolean checkWebUserDataPermission(HttpServletRequest request, String principalName, String[] roles)(Code)
Check the security for a given HttpServletReauest
Parameters:
  request - the http servlet request
Parameters:
  principalName - name of the principal
Parameters:
  roles - array of roles for this permission true if the permission is granted, else false



resetDeploymentDesc
protected void resetDeploymentDesc()(Code)
Reset Deployment Descriptor



translateSecurityConstraintElements
protected void translateSecurityConstraintElements() throws PermissionManagerException(Code)
3.1.3.1 Translating security-constraint elements The paragraphs of this section describe the translation of security-constraints into WebResourcePermission and WebUserDataPermission objects constructed using qualified URL pattern names. In the exceptional case, as defined in Qualified URL Pattern Names, where a pattern is made irrelevant by a qualifying pattern, the permission instantiations that would result from the translation of the pattern, as described below, must not be performed. Otherwise, the translation of URL patterns in security constraints must yield an equivalent translation to the translation that would result from following the instructions in the remainder of this section. [...]
throws:
  PermissionManagerException - if permissions can't be set



translateServletDeploymentDescriptor
public void translateServletDeploymentDescriptor() throws PermissionManagerException(Code)
3.1.3.Translating Servlet Deployment Descriptors A reference to a PolicyConfiguration object must be obtained by calling the getPolicyConfiguration method on the PolicyConfigurationFactory implementation class of the provider configured into the container. The policy context identifier used in the call to the getPolicyConfiguration method must be a String composed as described in Section 3.1.2, Servlet Policy Context Identifiers, on page 19. The value true must be passed as the second parameter in the call to getPolicyConfiguration to ensure that any and all policy statements are removed from the policy context associated with the returned PolicyConfiguration. The security-constraint and securityrole-ref elements in the deployment descriptor must be translated into permissions and added to the PolicyConfiguration object as defined in the following sections.
throws:
  PermissionManagerException - if permissions can't be set



translateServletSecurityRoleRef
protected void translateServletSecurityRoleRef() throws PermissionManagerException(Code)
3.1.3.2 Translating Servlet security-role-ref Elements For each security-role-ref appearing in the deployment descriptor a corresponding WebRoleRefPermission must be added to the corresponding role. The name of the WebRoleRefPermission must be the servlet-name in whose context the security-role-ref is defined. The actions of the WebRoleRefPermission must be the value of the role-name (that is the reference), appearing in the security-role-ref. The deployment tools must call the addToRole method on the PolicyConfiguration object to add the WebRoleRefPermission object resulting from the translation to the role identified in the role-link appearing in the security-role-ref. Additional WebRoleRefPermission objects must be added to the PolicyConfiguration as follows. For each servlet element in the deployment descriptor a WebRoleRefPermission must be added to each security-role whose name does not appear as the role-name in a security-role-ref within the servlet element. The name of each such WebRoleRefPermission must be the servlet-name of the corresponding servlet element. The actions (that is, reference) of each such WebRoleRefPermission must be the corresponding (non-appearing) role-name. The resulting permissions must be added to the corresponding roles by calling the addToRole method on the PolicyConfiguration object.
throws:
  PermissionManagerException - if permissions can't be set



Methods inherited from org.objectweb.jonas_lib.security.AbsPermissionManager
public void commit() throws PermissionManagerException(Code)(Java Doc)
public void delete() throws PermissionManagerException(Code)(Java Doc)
protected String getContextId()(Code)(Java Doc)
protected static Policy getPolicy()(Code)(Java Doc)
protected PolicyConfiguration getPolicyConfiguration()(Code)(Java Doc)
abstract protected void resetDeploymentDesc()(Code)(Java Doc)
protected void setContextId(String contextId)(Code)(Java Doc)
protected static void setPolicy(Policy policy)(Code)(Java Doc)
protected void setPolicyConfiguration(PolicyConfiguration policyConfiguration)(Code)(Java Doc)

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.