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


org.outerj.daisy.repository.commonimpl.DocumentStrategy

All known Subclasses:   org.outerj.daisy.repository.serverimpl.LocalDocumentStrategy,  org.outerj.daisy.repository.clientimpl.RemoteDocumentStrategy,
DocumentStrategy
public interface DocumentStrategy (Code)
Allows to customise some of the behaviour of the CommonRepository , and especially DocumentImpl .

The typical use of this is to provide two implementations of the repository API's: one for local (in-server) use, and one for remote (= client) use, by only having to implement twice those aspects which differ in each implementation.

The most important difference between the client and server API implementations will be how they load and store entities (such as Document objects): the client API implementation will do this by contacting the server, the server implementation will do this by using its persistence mechanisms (such as an RDBMS).

Note that this API is not really meant for public consumption, and the correct workings of its implementations (especially the server-side one) are crucial for the correct operation of the repository. It is important that the strategy implementation correctly initialiases, updates and interprets the internal state of the objects it handles.

Certain methonds, like DocumentStrategy.load(DocId,long,long,AuthenticatedUser) and DocumentStrategy.store(org.outerj.daisy.repository.commonimpl.DocumentImpl) need to check if the user has the rights to perform this operation. This is especially true for the serverside implementation, the client side implementation doesn't need to do this as it will contact the server which will automatically do this checks.

Certain methods, like DocumentStrategy.store(org.outerj.daisy.repository.commonimpl.DocumentImpl) might also need to send out events to eventlisteners.





Method Summary
public  voidcompleteVersion(DocumentVariantImpl variant, VersionImpl version)
     Loads the additional information skipped when the version was loaded via DocumentStrategy.loadShallowVersions(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl) .
public  DocumentcreateVariant(DocId docId, long startBranchId, long startLanguageId, long startVersionId, long newBranchId, long newLanguageId, AuthenticatedUser user)
    
public  voiddeleteDocument(DocId docId, AuthenticatedUser user)
    
public  voiddeleteVariant(DocId docId, long branchId, long languageId, AuthenticatedUser user)
    
public  AvailableVariantImpl[]getAvailableVariants(DocId docId, AuthenticatedUser user)
    
public  InputStreamgetBlob(DocId docId, long branchId, long languageId, long versionId, long partTypeId, AuthenticatedUser user)
    
public  InputStreamgetBlob(String blobKey)
     This method does not check access rights (unlike DocumentStrategy.getBlob(DocId,long,long,long,long,AuthenticatedUser) , because this one is only intended for use by Part objects.
public  LockInfoImplgetLockInfo(DocumentVariantImpl documentVariant)
    
public  Documentload(DocId docId, long branchId, long languageId, AuthenticatedUser user)
    
public  VersionImpl[]loadShallowVersions(DocumentVariantImpl variant)
     Loads all Version objects for this document as shallow Version objects (i.e.
public  VersionImplloadVersion(DocumentVariantImpl documentVariant, long versionId)
    
public  LockInfoImpllock(DocumentVariantImpl documentVariant, long duration, LockType lockType)
     Tries to create a lock on the document.
public  LockInfoImplreleaseLock(DocumentVariantImpl documentVariant)
    
public  voidstore(DocumentImpl document)
     Stores a document.
public  voidstoreVersion(DocumentImpl document, VersionImpl version, VersionState versionState, VersionKey syncedWith, ChangeType changeType, String changeComment)
    



Method Detail
completeVersion
public void completeVersion(DocumentVariantImpl variant, VersionImpl version) throws RepositoryException(Code)
Loads the additional information skipped when the version was loaded via DocumentStrategy.loadShallowVersions(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl) .



createVariant
public Document createVariant(DocId docId, long startBranchId, long startLanguageId, long startVersionId, long newBranchId, long newLanguageId, AuthenticatedUser user) throws RepositoryException(Code)

Parameters:
  startVersionId - -1 for last version, -2 for live version



deleteDocument
public void deleteDocument(DocId docId, AuthenticatedUser user) throws RepositoryException(Code)



deleteVariant
public void deleteVariant(DocId docId, long branchId, long languageId, AuthenticatedUser user) throws RepositoryException(Code)



getAvailableVariants
public AvailableVariantImpl[] getAvailableVariants(DocId docId, AuthenticatedUser user) throws RepositoryException(Code)



getBlob
public InputStream getBlob(DocId docId, long branchId, long languageId, long versionId, long partTypeId, AuthenticatedUser user) throws RepositoryException(Code)



getBlob
public InputStream getBlob(String blobKey) throws RepositoryException(Code)
This method does not check access rights (unlike DocumentStrategy.getBlob(DocId,long,long,long,long,AuthenticatedUser) , because this one is only intended for use by Part objects.



getLockInfo
public LockInfoImpl getLockInfo(DocumentVariantImpl documentVariant) throws RepositoryException(Code)



load
public Document load(DocId docId, long branchId, long languageId, AuthenticatedUser user) throws RepositoryException(Code)



loadShallowVersions
public VersionImpl[] loadShallowVersions(DocumentVariantImpl variant) throws RepositoryException(Code)
Loads all Version objects for this document as shallow Version objects (i.e. without their full content, but only the data necessary to show a version overview table).



loadVersion
public VersionImpl loadVersion(DocumentVariantImpl documentVariant, long versionId) throws RepositoryException(Code)



lock
public LockInfoImpl lock(DocumentVariantImpl documentVariant, long duration, LockType lockType) throws RepositoryException(Code)
Tries to create a lock on the document. If there was alread a pessimitic lock on the document, this method will return a LockInfo object containing information about that lock, so it is important to check the info in the LockInfo object to know if the lock was successful.



releaseLock
public LockInfoImpl releaseLock(DocumentVariantImpl documentVariant) throws RepositoryException(Code)



store
public void store(DocumentImpl document) throws RepositoryException(Code)
Stores a document. After successful storage, the document object status should be updates, i.e. the lastModified and lastModifier parts should be updated, and some dirty-indication flags should be reset.



storeVersion
public void storeVersion(DocumentImpl document, VersionImpl version, VersionState versionState, VersionKey syncedWith, ChangeType changeType, String changeComment) throws RepositoryException(Code)



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