com.uwyn.rife.cmf.dam.contentmanagers
Class DatabaseContent

java.lang.Object
  extended by com.uwyn.rife.database.DbQueryManager
      extended by com.uwyn.rife.cmf.dam.contentmanagers.DatabaseContent
All Implemented Interfaces:
ContentManager, Cloneable

public abstract class DatabaseContent
extends DbQueryManager
implements ContentManager


Field Summary
protected  HashMap<MimeType,ContentStore> mMimeMapping
           
protected  ArrayList<ContentStore> mStores
           
 
Constructor Summary
DatabaseContent(Datasource datasource)
           
 
Method Summary
protected  boolean _containsRepository(Select containsContentRepository, String name)
           
protected  boolean _createRepository(SequenceValue getContentRepositoryId, Insert storeContentRepository, String name)
           
protected  boolean _deleteContent(Select getContentInfo, Delete deleteContentInfo, Delete deleteContentAttributes, Delete deleteContentProperties, String location)
           
protected  String _getContentForHtml(String location, ElementSupport element, String serveContentExitName)
           
protected  DatabaseContentInfo _getContentInfo(Select getContentInfo, Select getContentAttributes, Select getContentProperties, String location)
           
protected  boolean _hasContentData(Select retrieveContent, String location)
           
protected  boolean _install(CreateSequence createSequenceContentRepository, CreateSequence createSequenceContentInfo, CreateTable createTableContentRepository, CreateTable createTableContentInfo, CreateTable createTableContentAttribute, CreateTable createTableContentProperty)
           
protected  boolean _remove(DropSequence dropSequenceContentRepository, DropSequence dropSequenceContentInfo, DropTable dropTableContentRepository, DropTable dropTableContentInfo, DropTable dropTableContentAttribute, DropTable dropTableContentProperty)
           
protected  void _serveContentData(ElementSupport element, String location)
           
protected  boolean _storeContent(SequenceValue getContentId, Select getContentRepositoryId, Insert storeContentInfo, Insert storeContentAttribute, Insert storeContentProperty, String location, Content content, ContentTransformer transformer)
           
protected
<ResultType>
ResultType
_useContentData(Select retrieveContent, String location, ContentDataUser user)
           
abstract  DatabaseContentInfo getContentInfo(String location)
          Retrieves the content info from a certain location.
protected  String getValueColumnName()
           
protected  Pair<String,String> splitLocation(String location)
           
 
Methods inherited from class com.uwyn.rife.database.DbQueryManager
clone, executeFetchAll, executeFetchAll, executeFetchAllBeans, executeFetchAllBeans, executeFetchFirst, executeFetchFirst, executeFetchFirstBean, executeFetchFirstBean, executeGetFirstBoolean, executeGetFirstBoolean, executeGetFirstByte, executeGetFirstByte, executeGetFirstBytes, executeGetFirstBytes, executeGetFirstDate, executeGetFirstDate, executeGetFirstDate, executeGetFirstDate, executeGetFirstDouble, executeGetFirstDouble, executeGetFirstFloat, executeGetFirstFloat, executeGetFirstInt, executeGetFirstInt, executeGetFirstLong, executeGetFirstLong, executeGetFirstShort, executeGetFirstShort, executeGetFirstString, executeGetFirstString, executeGetFirstTime, executeGetFirstTime, executeGetFirstTime, executeGetFirstTime, executeGetFirstTimestamp, executeGetFirstTimestamp, executeGetFirstTimestamp, executeGetFirstTimestamp, executeHasResultRows, executeHasResultRows, executeQuery, executeQuery, executeQuery, executeUpdate, executeUpdate, executeUpdate, executeUseFirstAsciiStream, executeUseFirstAsciiStream, executeUseFirstBinaryStream, executeUseFirstBinaryStream, executeUseFirstCharacterStream, executeUseFirstCharacterStream, fetch, fetch, fetchAll, getConnection, getDatasource, inTransaction, reserveConnection
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.uwyn.rife.cmf.dam.ContentManager
containsRepository, createRepository, deleteContent, getContentForHtml, hasContentData, install, remove, serveContentData, storeContent, useContentData
 

Field Detail

mStores

protected ArrayList<ContentStore> mStores

mMimeMapping

protected HashMap<MimeType,ContentStore> mMimeMapping
Constructor Detail

DatabaseContent

public DatabaseContent(Datasource datasource)
Method Detail

getContentInfo

public abstract DatabaseContentInfo getContentInfo(String location)
                                            throws ContentManagerException
Description copied from interface: ContentManager
Retrieves the content info from a certain location.

Specified by:
getContentInfo in interface ContentManager
Parameters:
location - the location whose content info has to be retrieved
Returns:
an instance of ContentInfo; or

null if no content is present at the location

Throws:
ContentManagerException - if an expected error occurred

_install

protected boolean _install(CreateSequence createSequenceContentRepository,
                           CreateSequence createSequenceContentInfo,
                           CreateTable createTableContentRepository,
                           CreateTable createTableContentInfo,
                           CreateTable createTableContentAttribute,
                           CreateTable createTableContentProperty)
                    throws ContentManagerException
Throws:
ContentManagerException

_remove

protected boolean _remove(DropSequence dropSequenceContentRepository,
                          DropSequence dropSequenceContentInfo,
                          DropTable dropTableContentRepository,
                          DropTable dropTableContentInfo,
                          DropTable dropTableContentAttribute,
                          DropTable dropTableContentProperty)
                   throws ContentManagerException
Throws:
ContentManagerException

getValueColumnName

protected String getValueColumnName()

_createRepository

protected boolean _createRepository(SequenceValue getContentRepositoryId,
                                    Insert storeContentRepository,
                                    String name)
                             throws ContentManagerException
Throws:
ContentManagerException

_containsRepository

protected boolean _containsRepository(Select containsContentRepository,
                                      String name)
                               throws ContentManagerException
Throws:
ContentManagerException

splitLocation

protected Pair<String,String> splitLocation(String location)

_storeContent

protected boolean _storeContent(SequenceValue getContentId,
                                Select getContentRepositoryId,
                                Insert storeContentInfo,
                                Insert storeContentAttribute,
                                Insert storeContentProperty,
                                String location,
                                Content content,
                                ContentTransformer transformer)
                         throws ContentManagerException
Throws:
ContentManagerException

_deleteContent

protected boolean _deleteContent(Select getContentInfo,
                                 Delete deleteContentInfo,
                                 Delete deleteContentAttributes,
                                 Delete deleteContentProperties,
                                 String location)
                          throws ContentManagerException
Throws:
ContentManagerException

_useContentData

protected <ResultType> ResultType _useContentData(Select retrieveContent,
                                                  String location,
                                                  ContentDataUser user)
                              throws ContentManagerException
Throws:
ContentManagerException

_hasContentData

protected boolean _hasContentData(Select retrieveContent,
                                  String location)
                           throws ContentManagerException
Throws:
ContentManagerException

_getContentInfo

protected DatabaseContentInfo _getContentInfo(Select getContentInfo,
                                              Select getContentAttributes,
                                              Select getContentProperties,
                                              String location)
                                       throws ContentManagerException
Throws:
ContentManagerException

_serveContentData

protected void _serveContentData(ElementSupport element,
                                 String location)
                          throws ContentManagerException
Throws:
ContentManagerException

_getContentForHtml

protected String _getContentForHtml(String location,
                                    ElementSupport element,
                                    String serveContentExitName)
                             throws ContentManagerException
Throws:
ContentManagerException


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.