Java Doc for ContentHostingHandlerResolverImpl.java in  » ERP-CRM-Financial » sakai » org » sakaiproject » content » impl » 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 » ERP CRM Financial » sakai » org.sakaiproject.content.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.sakaiproject.content.impl.ContentHostingHandlerResolverImpl

ContentHostingHandlerResolverImpl
public class ContentHostingHandlerResolverImpl implements BaseContentHostingHandlerResolver(Code)

Implementation of the Handler Resolver. This class chains back to the storage to get local entities but then resolves the IDs through to virtual content entities based on the name ContentHostingHandlers. The primary 3 methods are getRealParent(), getVirtualEntity(), and getVirtualChild(). The remaining methods are largely plumbing, proxying the Storage mechanism that is being used. The Storage mechanims must be aware that this code will cause re-entry into the Sotrage methods and so the Storage must implement some sort of call stack advisor to prevent recursion.

The getRealParent() method takes the current Id, and finds the closest ancestor that exists in the main Storage area.

The getVirtualEntity() converts a ContentEntity into a ContentEntity managed by the ContentHostingHandler named in that entity. If no ContentHostingHandler is named, then the ContentEntity is returned unchanged.

The getVirtualChild() method takes a ContentEntity that is a parent of the target ContentEntity and tried to find the target ContentEntity by navigating to children and resolving ContentEntity via ContentHostingHandlers where appropriate. If the target does not exist, null is returned.

To make this navigation process efficient there needs to be some form of Cache in place, ideally this would be a cluster wide cache with event based expiry.


author:
   ieb (initial version), johnf (substantial edits)


Field Summary
protected  org.sakaiproject.util.StorageUsercollectionStorageUser
    
protected  org.sakaiproject.util.StorageUserresourceStorageUser
    


Method Summary
public  voidcancelCollection(Storage storage, ContentCollectionEdit edit)
     Cancel collection, using storage if real, or the ContentHostingHandler if present.
public  voidcancelResource(Storage storage, ContentResourceEdit edit)
    
public  booleancheckCollection(Storage storage, String id)
    
public  booleancheckResource(Storage storage, String id)
    
public  voidcommitCollection(Storage storage, ContentCollectionEdit edit)
    
public  voidcommitDeleteResource(Storage storage, ContentResourceEdit edit, String uuid)
    
public  voidcommitResource(Storage storage, ContentResourceEdit edit)
    
public  ContentCollectionEditeditCollection(Storage storage, String id)
    
public  ContentResourceEditeditResource(Storage storage, String id)
    
public  ContentCollectiongetCollection(Storage storage, String id)
    
public  ListgetCollections(Storage storage, ContentCollection collection)
    
public  ListgetFlatResources(Storage storage, String id)
    
public  intgetMemberCount(Storage storage, String id)
    
public  ContentEntitygetRealParent(Storage storage, String id)
    
public  ContentResourcegetResource(Storage storage, String id)
    
public  byte[]getResourceBody(Storage storage, ContentResource resource)
    
public  ListgetResources(Storage storage, ContentCollection collection)
    
public  ContentEntitygetVirtualChild(String finalId, ContentEntity ce, boolean exact)
     Locate the ContentEntity with the final Id, or null if can't be found, resolving virtual content entities as part of the resolution process.
public  ContentEntitygetVirtualEntity(ContentEntity ce, String finalId)
     Convert the ContentEntity into its virtual shadow via its ContentHostingHandler bean.
public  EditnewCollectionEdit(String id)
    
public  EditnewResourceEdit(String id)
    
public  ContentCollectionEditputCollection(Storage storage, String id)
    
public  ContentResourceEditputDeleteResource(Storage storage, String id, String uuid, String userId)
    
public  ContentResourceEditputResource(Storage storage, String id)
    
public  voidremoveCollection(Storage storage, ContentCollectionEdit edit)
    
public  voidremoveResource(Storage storage, ContentResourceEdit edit)
    
public  voidsetCollectionUser(org.sakaiproject.util.StorageUser csu)
    
public  voidsetResourceUser(org.sakaiproject.util.StorageUser rsu)
    
public  InputStreamstreamResourceBody(Storage storage, ContentResource resource)
    

Field Detail
collectionStorageUser
protected org.sakaiproject.util.StorageUser collectionStorageUser(Code)



resourceStorageUser
protected org.sakaiproject.util.StorageUser resourceStorageUser(Code)





Method Detail
cancelCollection
public void cancelCollection(Storage storage, ContentCollectionEdit edit)(Code)
Cancel collection, using storage if real, or the ContentHostingHandler if present.



cancelResource
public void cancelResource(Storage storage, ContentResourceEdit edit)(Code)
Cancel collection, using storage if real, or the ContentHostingHandler if present



checkCollection
public boolean checkCollection(Storage storage, String id)(Code)



checkResource
public boolean checkResource(Storage storage, String id)(Code)



commitCollection
public void commitCollection(Storage storage, ContentCollectionEdit edit)(Code)



commitDeleteResource
public void commitDeleteResource(Storage storage, ContentResourceEdit edit, String uuid)(Code)



commitResource
public void commitResource(Storage storage, ContentResourceEdit edit) throws ServerOverloadException(Code)



editCollection
public ContentCollectionEdit editCollection(Storage storage, String id)(Code)



editResource
public ContentResourceEdit editResource(Storage storage, String id)(Code)



getCollection
public ContentCollection getCollection(Storage storage, String id)(Code)



getCollections
public List getCollections(Storage storage, ContentCollection collection)(Code)



getFlatResources
public List getFlatResources(Storage storage, String id)(Code)



getMemberCount
public int getMemberCount(Storage storage, String id)(Code)



getRealParent
public ContentEntity getRealParent(Storage storage, String id)(Code)
Find the closest real ancestor to the requested id, this recurses into itself
Parameters:
  id - the closest ancestor or null if not found (bit unlikely)



getResource
public ContentResource getResource(Storage storage, String id)(Code)



getResourceBody
public byte[] getResourceBody(Storage storage, ContentResource resource) throws ServerOverloadException(Code)

throws:
  ServerOverloadException -



getResources
public List getResources(Storage storage, ContentCollection collection)(Code)



getVirtualChild
public ContentEntity getVirtualChild(String finalId, ContentEntity ce, boolean exact)(Code)
Locate the ContentEntity with the final Id, or null if can't be found, resolving virtual content entities as part of the resolution process. Will return a real content entity if that is what the finalId represents.
Parameters:
  finalId -
Parameters:
  ce -
Parameters:
  exact - -if true, the exact match otherwise the nearest ancestor



getVirtualEntity
public ContentEntity getVirtualEntity(ContentEntity ce, String finalId)(Code)
Convert the ContentEntity into its virtual shadow via its ContentHostingHandler bean. If no bean is defined for the ContentEntity, no resolution is performed. If the ContentEntity is null, no resolution is performed.
Parameters:
  ce - a resolved ContentEntity where appropriate, otherwise the orginal



newCollectionEdit
public Edit newCollectionEdit(String id)(Code)



newResourceEdit
public Edit newResourceEdit(String id)(Code)



putCollection
public ContentCollectionEdit putCollection(Storage storage, String id)(Code)



putDeleteResource
public ContentResourceEdit putDeleteResource(Storage storage, String id, String uuid, String userId)(Code)



putResource
public ContentResourceEdit putResource(Storage storage, String id)(Code)



removeCollection
public void removeCollection(Storage storage, ContentCollectionEdit edit)(Code)



removeResource
public void removeResource(Storage storage, ContentResourceEdit edit)(Code)



setCollectionUser
public void setCollectionUser(org.sakaiproject.util.StorageUser csu)(Code)



setResourceUser
public void setResourceUser(org.sakaiproject.util.StorageUser rsu)(Code)



streamResourceBody
public InputStream streamResourceBody(Storage storage, ContentResource resource) throws ServerOverloadException(Code)

throws:
  ServerOverloadException -



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.