Java Doc for ContentStore.java in  » Web-Framework » rife-1.6.1 » com » uwyn » rife » cmf » dam » 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 » Web Framework » rife 1.6.1 » com.uwyn.rife.cmf.dam 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.uwyn.rife.cmf.dam.ContentStore

All known Subclasses:   com.uwyn.rife.cmf.dam.contentstores.DatabaseRawStore,  com.uwyn.rife.cmf.dam.contentstores.DatabaseContentStore,
ContentStore
public interface ContentStore (Code)
A ContentStore stores the actual content data and is responsible for managing it.

The store doesn't work with paths, but with content ids. Each id identifies a specific content instance at a certain location and with a certain version number.

Each store is only capable of storing content with certain mime types. The store is optimized for a certain kind of content and will maybe not be able to correctly handle other types.
author:
   Geert Bevin (gbevin[remove] at uwyn dot com)i
version:
   $Revision: 3634 $
since:
   1.0





Method Summary
public  booleandeleteContentData(int id)
     Deletes the content data for a certain content id.
public  StringgetContentForHtml(int id, ContentInfo info, ElementSupport element, String serveContentExitName)
     Retrieves a content data representation for use in html.

This is mainly used to integrate content data inside a html document.

public  StringgetContentType(ContentInfo contentInfo)
     Generates the HTTP content type that corresponds best to the information in the provided ContentInfo.
public  FormattergetFormatter(MimeType mimeType, boolean fragment)
     Returns a Formatter instance that will be used to load and to format the content data.
public  intgetSize(int id)
     Retrieves the size of the content data for a certain content id.

Note that the result is specific to the data store.

public  Collection<MimeType>getSupportedMimeTypes()
     Returns the collection of mime types that the content store supports.
public  booleanhasContentData(int id)
     Checks whether content data is available for a certain content id.
public  booleaninstall()
     Installs a content store.
public  booleanremove()
     Removes a content store.
public  voidserveContentData(ElementSupport element, int id)
     Serves content data for a certain content id through the provided element.
public  booleanstoreContentData(int id, Content content, ContentTransformer transformer)
     Stores the content data for a certain content id.
public  ResultTypeuseContentData(int id, ContentDataUser user)
     Use the data of a certain content id.

Some content data will only be available during this method call due to their volatile nature (certain streams for instance).




Method Detail
deleteContentData
public boolean deleteContentData(int id) throws ContentManagerException(Code)
Deletes the content data for a certain content id.
Parameters:
  id - the id of the content whose data will be deleted true if the deletion was successfully; or

false if it wasn't.
exception:
  ContentManagerException - if an unexpected error occurred
since:
   1.0




getContentForHtml
public String getContentForHtml(int id, ContentInfo info, ElementSupport element, String serveContentExitName) throws ContentManagerException(Code)
Retrieves a content data representation for use in html.

This is mainly used to integrate content data inside a html document. For instance, html content will be displayed as-is, while image content will cause an image tag to be generated with the correct source URL to serve the image.
Parameters:
  id - the id of the content whose data will be displayed
Parameters:
  info - the content info instance for which the html contenthas to be generated
Parameters:
  element - an active element instance
Parameters:
  serveContentExitName - the exit namet that leads to a com.uwyn.rife.cmf.elements.ServeContent ServeContent element. This willbe used to generate URLs for content that can't be directly displayedin-line. the html content representation
exception:
  ContentManagerException - if an unexpected error occurred
since:
   1.0




getContentType
public String getContentType(ContentInfo contentInfo)(Code)
Generates the HTTP content type that corresponds best to the information in the provided ContentInfo.
Parameters:
  contentInfo - the content info instance for which the content typehas to be generated the generated content type
since:
   1.0



getFormatter
public Formatter getFormatter(MimeType mimeType, boolean fragment)(Code)
Returns a Formatter instance that will be used to load and to format the content data.
Parameters:
  mimeType - the mime type for which the formatter will be returned
Parameters:
  fragment - true if the content that has to beformatter is a fragment; or

false otherwise the corresponding formatter
since:
   1.0




getSize
public int getSize(int id) throws ContentManagerException(Code)
Retrieves the size of the content data for a certain content id.

Note that the result is specific to the data store. For instance, text data could return the number of characters, while image data could return the number of bytes.
Parameters:
  id - the id of the content whose data size will be returned -1 if no data is available for the providedcontent id; or

the requested content data size.
exception:
  ContentManagerException - if an unexpected error occurred
since:
   1.0




getSupportedMimeTypes
public Collection<MimeType> getSupportedMimeTypes()(Code)
Returns the collection of mime types that the content store supports. the collection of supported mime types
since:
   1.0



hasContentData
public boolean hasContentData(int id) throws ContentManagerException(Code)
Checks whether content data is available for a certain content id.
Parameters:
  id - the id of the content whose data availability will be checked true if content data is available; or

false if it isn't.
exception:
  ContentManagerException - if an expected error occurred
since:
   1.0




install
public boolean install() throws ContentManagerException(Code)
Installs a content store. true if the installation was successful; or

false if it wasn't.
exception:
  ContentManagerException - if an unexpected error occurred
since:
   1.0




remove
public boolean remove() throws ContentManagerException(Code)
Removes a content store. true if the removal was successful; or

false if it wasn't.
exception:
  ContentManagerException - if an unexpected error occurred
since:
   1.0




serveContentData
public void serveContentData(ElementSupport element, int id) throws ContentManagerException(Code)
Serves content data for a certain content id through the provided element.

This is intended to take over the complete handling of the request, so no other content should be output and no headers manipulated in the element if this method is called.
Parameters:
  element - an active element instance
Parameters:
  id - the id of the content whose data will be served
exception:
  ContentManagerException - if an unexpected error occurred
since:
   1.0




storeContentData
public boolean storeContentData(int id, Content content, ContentTransformer transformer) throws ContentManagerException(Code)
Stores the content data for a certain content id.
Parameters:
  id - the id of the content whose data will be stored
Parameters:
  content - the content whose data has to be stored
Parameters:
  transformer - a transformer that will modify the content data; or

null if the content data should stay intact true if the storing was successfully; or

false if it wasn't.
exception:
  ContentManagerException - if an unexpected error occurred
since:
   1.0




useContentData
public ResultType useContentData(int id, ContentDataUser user) throws ContentManagerException(Code)
Use the data of a certain content id.

Some content data will only be available during this method call due to their volatile nature (certain streams for instance). Therefore, one has to be careful when trying to move the data that is provided to the content user outside this method. The behaviour is undefined.
Parameters:
  id - the id of the content whose data will be used
Parameters:
  user - the content user instance that will be called to usecontent data the data that the ContentDataUser.useContentData(Object)returns after its usage
exception:
  ContentManagerException - if an unexpected error occurred
since:
   1.0




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