Java Doc for AccessManager.java in  » Content-Management-System » daisy » org » outerj » daisy » repository » acl » 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 » Content Management System » daisy » org.outerj.daisy.repository.acl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.outerj.daisy.repository.acl.AccessManager

All known Subclasses:   org.outerj.daisy.repository.commonimpl.acl.AccessManagerImpl,
AccessManager
public interface AccessManager (Code)
Provides functionality for maintaining the ACL (Access Control List) and checking permissions.

The AccessManager can be retrieved via org.outerj.daisy.repository.Repository.getAccessManager .

See Daisy's documentation for background information on the ACL system.

Basically, instead of associating an ACL with each document in the repository, there is one global ACL. Which ACL entries applies to which documents is based on conditions selecting documents based on eg their document type or collection membership. The structure of the ACL is thus as follows:

 object expression
 acl entry
 acl entry
 ...
 object expression
 acl entry
 acl entry
 ...
 ...
 

wherin the "object expression" is the expression selecting a set of documents. Each "acl entry" specifies for a certain subject (user, role or everyone) the allowed action (deny/grant) for a certain operation (read/write).

Two ACL's are managed: a staging ACL and a live ACL. Only the staging ACL can be directly modified, the live ACL can be updated by replacing it with the staging ACL.

About access to these functions: all users can read the ACL, only the Administrator can save (modify) it. All users can retrieve access information (ie using the getAclInfo* methods) for themselves, the Administrator can retrieve this information for whatever user.





Method Summary
 voidcopyLiveToStaging()
     Reverts changes to the staging ACL.
 voidcopyStagingToLive()
     Puts the staging ACL live.
 long[]filterDocumentTypes(long[] documentTypeIds, long collectionId)
     Filters the given list of document type ids to the ones for which the user is potentially able to create new documents.
 VariantKey[]filterDocuments(VariantKey[] variantKeys, AclPermission permission, boolean nonLive)
     Filters the given list of document variants so that only document variants to which the current user has the given ACL permission remains.
 VariantKey[]filterDocuments(VariantKey[] variantKeys, AclPermission permission)
     Filter documents assuming access to non-live versions is not required.
 VariantKey[]filterDocuments(VariantKey[] variantKeys)
     Filters documents based on 'read' permission and without requiring access to all versions.
 AclResultInfogetAclInfo(Document document)
     Gets ACL info for the current user, by evaluating the (live) ACL rules on the given document object.
 AclResultInfogetAclInfoOnLive(long userId, long[] roleIds, String documentId, long branchId, long languageId)
     Gets ACL info for the specified user acting in the specified role, for the specified document variant, by evaluating the live ACL.
 AclResultInfogetAclInfoOnLive(long userId, long[] roleIds, VariantKey key)
     Gets ACL info for the specified user acting in the specified role, for the specified document variant, by evaluating the live ACL.
 AclResultInfogetAclInfoOnLive(long userId, long[] roleIds, String documentId)
     Gets the ACL info for the branch "main" and language "default" of the document.
 AclResultInfogetAclInfoOnLive(long userId, long[] roleIds, Document document)
     Checks the ACL using the supplied document object.
 AclResultInfogetAclInfoOnStaging(long userId, long[] roleIds, String documentId, long branchId, long languageId)
     Gets ACL info for the specified user acting in the specified role, for the specified document variant, by evaluating the staging ACL.
 AclResultInfogetAclInfoOnStaging(long userId, long[] roleIds, VariantKey key)
     Gets ACL info for the specified user acting in the specified role, for the specified document variant, by evaluating the staging ACL.
 AclResultInfogetAclInfoOnStaging(long userId, long[] roleIds, String documentId)
     Gets the ACL info for the branch "main" and language "default" of the document.
 AclResultInfogetAclInfoOnStaging(long userId, long[] roleIds, Document document)
     Equivalent of AccessManager.getAclInfoOnLive(long,long[],org.outerj.daisy.repository.Document) .
 AclgetLiveAcl()
     Gets the currently active, live ACL.
 AclgetStagingAcl()
     Gets the staging ACL.



Method Detail
copyLiveToStaging
void copyLiveToStaging() throws RepositoryException(Code)
Reverts changes to the staging ACL.



copyStagingToLive
void copyStagingToLive() throws RepositoryException(Code)
Puts the staging ACL live.



filterDocumentTypes
long[] filterDocumentTypes(long[] documentTypeIds, long collectionId) throws RepositoryException(Code)
Filters the given list of document type ids to the ones for which the user is potentially able to create new documents. This does not guarantee that the user will be able to save a newly created document, as this could depend on the values of document fields or the collections to which the document belongs.

The collectionId parameter is optional (specify -1 to ignore) and allows to specify the collection to which the document will be added, which allows for a better filtered result.




filterDocuments
VariantKey[] filterDocuments(VariantKey[] variantKeys, AclPermission permission, boolean nonLive) throws RepositoryException(Code)
Filters the given list of document variants so that only document variants to which the current user has the given ACL permission remains. Non-existing documents/variants will also be excluded.

Especially in the remote API implementation, this is more efficient then retrieving this information for individual documents, since it only requires one backend HTTP call.
Parameters:
  nonLive - set to true when read access to all versions of the document is required(rather than just the live version).




filterDocuments
VariantKey[] filterDocuments(VariantKey[] variantKeys, AclPermission permission) throws RepositoryException(Code)
Filter documents assuming access to non-live versions is not required.



filterDocuments
VariantKey[] filterDocuments(VariantKey[] variantKeys) throws RepositoryException(Code)
Filters documents based on 'read' permission and without requiring access to all versions. See also AccessManager.filterDocuments(org.outerj.daisy.repository.VariantKey[],AclPermission) .



getAclInfo
AclResultInfo getAclInfo(Document document) throws RepositoryException(Code)
Gets ACL info for the current user, by evaluating the (live) ACL rules on the given document object.



getAclInfoOnLive
AclResultInfo getAclInfoOnLive(long userId, long[] roleIds, String documentId, long branchId, long languageId) throws RepositoryException(Code)
Gets ACL info for the specified user acting in the specified role, for the specified document variant, by evaluating the live ACL.



getAclInfoOnLive
AclResultInfo getAclInfoOnLive(long userId, long[] roleIds, VariantKey key) throws RepositoryException(Code)
Gets ACL info for the specified user acting in the specified role, for the specified document variant, by evaluating the live ACL.



getAclInfoOnLive
AclResultInfo getAclInfoOnLive(long userId, long[] roleIds, String documentId) throws RepositoryException(Code)
Gets the ACL info for the branch "main" and language "default" of the document. This method is mainly provided for backwards compatibility.



getAclInfoOnLive
AclResultInfo getAclInfoOnLive(long userId, long[] roleIds, Document document) throws RepositoryException(Code)
Checks the ACL using the supplied document object. The current content of the document is used during ACL evaluation, even if it includes unsaved changes. This allows to check the ACL result before saving the document.

This method does not work in the remote API implementation.




getAclInfoOnStaging
AclResultInfo getAclInfoOnStaging(long userId, long[] roleIds, String documentId, long branchId, long languageId) throws RepositoryException(Code)
Gets ACL info for the specified user acting in the specified role, for the specified document variant, by evaluating the staging ACL.



getAclInfoOnStaging
AclResultInfo getAclInfoOnStaging(long userId, long[] roleIds, VariantKey key) throws RepositoryException(Code)
Gets ACL info for the specified user acting in the specified role, for the specified document variant, by evaluating the staging ACL.



getAclInfoOnStaging
AclResultInfo getAclInfoOnStaging(long userId, long[] roleIds, String documentId) throws RepositoryException(Code)
Gets the ACL info for the branch "main" and language "default" of the document. This method is mainly provided for backwards compatibility.



getAclInfoOnStaging
AclResultInfo getAclInfoOnStaging(long userId, long[] roleIds, Document document) throws RepositoryException(Code)
Equivalent of AccessManager.getAclInfoOnLive(long,long[],org.outerj.daisy.repository.Document) .



getLiveAcl
Acl getLiveAcl() throws RepositoryException(Code)
Gets the currently active, live ACL. This ACL is not modifiable. To make modifications to the ACL, first modify the staging ACL, and then put the staging version live by callling AccessManager.copyLiveToStaging() .



getStagingAcl
Acl getStagingAcl() throws RepositoryException(Code)
Gets the staging ACL.



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