Java Doc for MetaDataRoleAuthorizationStrategy.java in  » J2EE » wicket » org » apache » wicket » authorization » strategies » role » metadata » 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 » wicket » org.apache.wicket.authorization.strategies.role.metadata 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.wicket.authorization.strategies.role.AbstractRoleAuthorizationStrategy
      org.apache.wicket.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy

MetaDataRoleAuthorizationStrategy
public class MetaDataRoleAuthorizationStrategy extends AbstractRoleAuthorizationStrategy (Code)
Strategy that uses the Wicket metadata facility to check authorization. The static authorize methods are for authorizing component actions and component instantiation by role. This class is is the main entry point for users wanting to use the roles-based authorization of the wicket-auth-roles package based on wicket metadata. For instance, use like:
 MetaDataRoleAuthorizationStrategy.authorize(myPanel, RENDER, "ADMIN");
 
for actions on component instances, or:
 MetaDataRoleAuthorizationStrategy.authorize(AdminBookmarkablePage.class, "ADMIN");
 
for doing role based authorization for component instantation.
See Also:   org.apache.wicket.MetaDataKey
author:
   Eelco Hillenius
author:
   Jonathan Locke


Field Summary
final public static  MetaDataKeyACTION_PERMISSIONS
     Component meta data key for ations/ roles information.
final public static  MetaDataKeyINSTANTIATION_PERMISSIONS
     Application meta data key for ations/ roles information.
final public static  StringNO_ROLE
    

Constructor Summary
public  MetaDataRoleAuthorizationStrategy(IRoleCheckingStrategy roleCheckingStrategy)
     Construct.

Method Summary
final public static  voidauthorize(Class<? extends Component> componentClass, String roles)
     Authorizes the given role to create component instances of type componentClass.
final public static  voidauthorize(Component component, Action action, String roles)
     Authorizes the given role to perform the given action on the given component.
final public static  voidauthorizeAll(Class<? extends Component> componentClass)
     Grants permission to all roles to create instances of the given component class.
final public static  voidauthorizeAll(Component component, Action action)
     Grants permission to all roles to perform the given action on the given component.
public  booleanisActionAuthorized(Component component, Action action)
     Uses component level meta data to match roles for component action execution.
public  booleanisInstantiationAuthorized(Class componentClass)
     Uses application level meta data to match roles for component instantiation.
final public static  voidunauthorize(Class<? extends Component> componentClass, String roles)
     Removes permission for the given roles to create instances of the given component class.
final public static  voidunauthorize(Component component, Action action, String roles)
     Removes permission for the given role to perform the given action on the given component.
final public static  voidunauthorizeAll(Class<? extends Component> componentClass)
     Grants authorization to instantiate the given class to just the role NO_ROLE, effectively denying all other roles.
final public static  voidunauthorizeAll(Component component, Action action)
     Grants authorization to perform the given action to just the role NO_ROLE, effectively denying all other roles.

Field Detail
ACTION_PERMISSIONS
final public static MetaDataKey ACTION_PERMISSIONS(Code)
Component meta data key for ations/ roles information. Typically, you do not need to use this meta data key directly, but instead use one of the bind methods of this class.



INSTANTIATION_PERMISSIONS
final public static MetaDataKey INSTANTIATION_PERMISSIONS(Code)
Application meta data key for ations/ roles information. Typically, you do not need to use this meta data key directly, but instead use one of the bind methods of this class.



NO_ROLE
final public static String NO_ROLE(Code)
Special role string for denying access to all




Constructor Detail
MetaDataRoleAuthorizationStrategy
public MetaDataRoleAuthorizationStrategy(IRoleCheckingStrategy roleCheckingStrategy)(Code)
Construct.
Parameters:
  roleCheckingStrategy - the authorizer object




Method Detail
authorize
final public static void authorize(Class<? extends Component> componentClass, String roles)(Code)
Authorizes the given role to create component instances of type componentClass. This authorization is added to any previously authorized roles.
Parameters:
  componentClass - The component type that is subject for the authorization
Parameters:
  roles - The comma separated roles that are authorized to createcomponent instances of type componentClass



authorize
final public static void authorize(Component component, Action action, String roles)(Code)
Authorizes the given role to perform the given action on the given component.
Parameters:
  component - The component that is subject to the authorization
Parameters:
  action - The action to authorize
Parameters:
  roles - The comma separated roles to authorize



authorizeAll
final public static void authorizeAll(Class<? extends Component> componentClass)(Code)
Grants permission to all roles to create instances of the given component class.
Parameters:
  componentClass - The component class



authorizeAll
final public static void authorizeAll(Component component, Action action)(Code)
Grants permission to all roles to perform the given action on the given component.
Parameters:
  component - The component that is subject to the authorization
Parameters:
  action - The action to authorize



isActionAuthorized
public boolean isActionAuthorized(Component component, Action action)(Code)
Uses component level meta data to match roles for component action execution.
See Also:   org.apache.wicket.authorization.IAuthorizationStrategy.isActionAuthorized(org.apache.wicket.Componentorg.apache.wicket.authorization.Action)



isInstantiationAuthorized
public boolean isInstantiationAuthorized(Class componentClass)(Code)
Uses application level meta data to match roles for component instantiation.
See Also:   org.apache.wicket.authorization.IAuthorizationStrategy.isInstantiationAuthorized(java.lang.Class)



unauthorize
final public static void unauthorize(Class<? extends Component> componentClass, String roles)(Code)
Removes permission for the given roles to create instances of the given component class. There is no danger in removing authorization by calling this method. If the last authorization grant is removed for a given componentClass, the internal role NO_ROLE will automatically be added, effectively denying access to all roles (if this was not done, all roles would suddenly have access since no authorization is equivalent to full access).
Parameters:
  componentClass - The component type
Parameters:
  roles - The comma separated list of roles that are no longer to beauthorized to create instances of type componentClass



unauthorize
final public static void unauthorize(Component component, Action action, String roles)(Code)
Removes permission for the given role to perform the given action on the given component. There is no danger in removing authorization by calling this method. If the last authorization grant is removed for a given action, the internal role NO_ROLE will automatically be added, effectively denying access to all roles (if this was not done, all roles would suddenly have access since no authorization is equivalent to full access).
Parameters:
  component - The component
Parameters:
  action - The action
Parameters:
  roles - The comma separated list of roles that are no longer allowedto perform the given action



unauthorizeAll
final public static void unauthorizeAll(Class<? extends Component> componentClass)(Code)
Grants authorization to instantiate the given class to just the role NO_ROLE, effectively denying all other roles.
Parameters:
  componentClass - The component class



unauthorizeAll
final public static void unauthorizeAll(Component component, Action action)(Code)
Grants authorization to perform the given action to just the role NO_ROLE, effectively denying all other roles.
Parameters:
  component - the component that is subject to the authorization
Parameters:
  action - the action to authorize



Methods inherited from org.apache.wicket.authorization.strategies.role.AbstractRoleAuthorizationStrategy
final protected boolean hasAny(Roles roles)(Code)(Java Doc)
final protected boolean isEmpty(Roles roles)(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.