Java Doc for Acl.java in  » Security » acegi-security » org » acegisecurity » acls » 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 » Security » acegi security » org.acegisecurity.acls 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.acegisecurity.acls.Acl

All known Subclasses:   org.acegisecurity.acls.domain.AclImpl,
Acl
public interface Acl extends Serializable(Code)
Represents an access control list (ACL) for a domain object.

An Acl represents all ACL entries for a given domain object. In order to avoid needing references to the domain object itself, this interface handles indirection between a domain object and an ACL object identity via the org.acegisecurity.acls.objectidentity.ObjectIdentity interface.

An implementation represents the org.acegisecurity.acls.Permission list applicable for some or all org.acegisecurity.acls.sid.Sid instances.


author:
   Ben Alex
version:
   $Id: Acl.java 1784 2007-02-24 21:00:24Z luke_t $




Method Summary
 AccessControlEntry[]getEntries()
     Returns all of the entries represented by the present Acl (not parents).

This method is typically used for administrative purposes.

The order that entries appear in the array is unspecified.

 ObjectIdentitygetObjectIdentity()
     Obtains the domain object this Acl provides entries for.
 SidgetOwner()
     Determines the owner of the Acl.
 AclgetParentAcl()
     A domain object may have a parent for the purpose of ACL inheritance.
 booleanisEntriesInheriting()
     Indicates whether the ACL entries from the Acl.getParentAcl() should flow down into the current Acl.

The mere link between an Acl and a parent Acl on its own is insufficient to cause ACL entries to inherit down.

 booleanisGranted(Permission[] permission, Sid[] sids, boolean administrativeMode)
     This is the actual authorization logic method, and must be used whenever ACL authorization decisions are required.

An array of Sids are presented, representing security identifies of the current principal.

 booleanisSidLoaded(Sid[] sids)
     For efficiency reasons an Acl may be loaded and not contain entries for every Sid in the system.



Method Detail
getEntries
AccessControlEntry[] getEntries()(Code)
Returns all of the entries represented by the present Acl (not parents).

This method is typically used for administrative purposes.

The order that entries appear in the array is unspecified. However, if implementations use particular ordering logic in authorization decisions, the entries returned by this method MUST be ordered in that manner.

Do NOT use this method for making authorization decisions. Instead use Acl.isGranted(Permission[],Sid[],boolean) .

This method must operate correctly even if the Acl only represents a subset of Sids. The caller is responsible for correctly handling the result if only a subset of Sids is represented.

the list of entries represented by the Acl



getObjectIdentity
ObjectIdentity getObjectIdentity()(Code)
Obtains the domain object this Acl provides entries for. This is immutable once an Acl is created. the object identity



getOwner
Sid getOwner()(Code)
Determines the owner of the Acl. The meaning of ownership varies by implementation and is unspecified. the owner (may be null if the implementation does not use ownership concepts)



getParentAcl
Acl getParentAcl()(Code)
A domain object may have a parent for the purpose of ACL inheritance. If there is a parent, its ACL can be accessed via this method. In turn, the parent's parent (grandparent) can be accessed and so on.

This method solely represents the presence of a navigation hierarchy between the parent Acl and this Acl. For actual inheritance to take place, the Acl.isEntriesInheriting() must also be true.

This method must operate correctly even if the Acl only represents a subset of Sids. The caller is responsible for correctly handling the result if only a subset of Sids is represented.

the parent Acl



isEntriesInheriting
boolean isEntriesInheriting()(Code)
Indicates whether the ACL entries from the Acl.getParentAcl() should flow down into the current Acl.

The mere link between an Acl and a parent Acl on its own is insufficient to cause ACL entries to inherit down. This is because a domain object may wish to have entirely independent entries, but maintain the link with the parent for navigation purposes. Thus, this method denotes whether or not the navigation relationship also extends to the actual inheritence of entries.

true if parent ACL entries inherit into the current Acl



isGranted
boolean isGranted(Permission[] permission, Sid[] sids, boolean administrativeMode) throws NotFoundException, UnloadedSidException(Code)
This is the actual authorization logic method, and must be used whenever ACL authorization decisions are required.

An array of Sids are presented, representing security identifies of the current principal. In addition, an array of Permissions is presented which will have one or more bits set in order to indicate the permissions needed for an affirmative authorization decision. An array is presented because holding any of the Permissions inside the array will be sufficient for an affirmative authorization.

The actual approach used to make authorization decisions is left to the implementation and is not specified by this interface. For example, an implementation MAY search the current ACL in the order the ACL entries have been stored. If a single entry is found that has the same active bits as are shown in a passed Permission, that entry's grant or deny state may determine the authorization decision. If the case of a deny state, the deny decision will only be relevant if all other Permissions passed in the array have also been unsuccessfully searched. If no entry is found that match the bits in the current ACL, provided that Acl.isEntriesInheriting() is true, the authorization decision may be passed to the parent ACL. If there is no matching entry, the implementation MAY throw an exception, or make a predefined authorization decision.

This method must operate correctly even if the Acl only represents a subset of Sids.


Parameters:
  permission - the permission or permissions required
Parameters:
  sids - the security identities held by the principal
Parameters:
  administrativeMode - if true denotes the query is for administrative purposes and no loggingor auditing (if supported by the implementation) should be undertaken true is authorization is granted
throws:
  NotFoundException - MUST be thrown if an implementation cannot make an authoritative authorizationdecision, usually because there is no ACL information for this particular permission and/or SID
throws:
  UnloadedSidException - thrown if the Acl does not have details for one or more of theSids passed as arguments



isSidLoaded
boolean isSidLoaded(Sid[] sids)(Code)
For efficiency reasons an Acl may be loaded and not contain entries for every Sid in the system. If an Acl has been loaded and does not represent every Sid, all methods of the Sid can only be used within the limited scope of the Sid instances it actually represents.

It is normal to load an Acl for only particular Sids if read-only authorization decisions are being made. However, if user interface reporting or modification of Acls are desired, an Acl should be loaded with all Sids. This method denotes whether or not the specified Sids have been loaded or not.


Parameters:
  sids - one or more security identities the caller is interest in knowing whether this Sidsupports true if every passed Sid is represented by this Acl instance



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