com.uwyn.rife.cmf.dam.contentstores
Class DatabaseImageStore
java.lang.Object
com.uwyn.rife.database.DbQueryManager
com.uwyn.rife.cmf.dam.contentstores.DatabaseContentStore
com.uwyn.rife.cmf.dam.contentstores.DatabaseImageStore
- All Implemented Interfaces:
- ContentStore, Cloneable
public abstract class DatabaseImageStore
- extends DatabaseContentStore
|
Method Summary |
protected boolean |
_storeContentData(Insert storeContent,
int id,
Content content,
ContentTransformer transformer)
|
protected
|
_useContentData(Select retrieveContent,
int id,
ContentDataUser user)
|
String |
getContentForHtml(int id,
ContentInfo info,
ElementSupport element,
String serveContentExitName)
Retrieves a content data representation for use in html. |
String |
getContentType(ContentInfo contentInfo)
Generates the HTTP content type that corresponds best to the
information in the provided ContentInfo. |
Formatter |
getFormatter(MimeType mimeType,
boolean fragment)
Returns a Formatter instance that will be used to load and
to format the content data. |
protected int |
getNullSqlType()
|
protected void |
outputContentColumn(ResultSet resultSet,
OutputStream os)
|
protected boolean |
storeTypedData(Insert storeContent,
int id,
byte[] data)
|
| 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 |
DatabaseImageStore
public DatabaseImageStore(Datasource datasource)
getContentType
public String getContentType(ContentInfo contentInfo)
- Description copied from interface:
ContentStore
- 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 type
has to be generated
- Returns:
- the generated content type
getFormatter
public Formatter getFormatter(MimeType mimeType,
boolean fragment)
- Description copied from interface:
ContentStore
- 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 returnedfragment - true if the content that has to be
formatter is a fragment; or
false otherwise
- Returns:
- the corresponding formatter
getContentForHtml
public String getContentForHtml(int id,
ContentInfo info,
ElementSupport element,
String serveContentExitName)
throws ContentManagerException
- Description copied from interface:
ContentStore
- 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 displayedinfo - the content info instance for which the html content
has to be generatedelement - an active element instanceserveContentExitName - the exit namet that leads to a ServeContent element. This will
be used to generate URLs for content that can't be directly displayed
in-line.
- Returns:
- the html content representation
- Throws:
ContentManagerException - if an unexpected error occurred
_storeContentData
protected boolean _storeContentData(Insert storeContent,
int id,
Content content,
ContentTransformer transformer)
throws ContentManagerException
- Throws:
ContentManagerException
storeTypedData
protected boolean storeTypedData(Insert storeContent,
int id,
byte[] data)
throws ContentManagerException
- Throws:
ContentManagerException
getNullSqlType
protected int getNullSqlType()
_useContentData
protected <ResultType> ResultType _useContentData(Select retrieveContent,
int id,
ContentDataUser user)
throws ContentManagerException
- Throws:
ContentManagerException
outputContentColumn
protected void outputContentColumn(ResultSet resultSet,
OutputStream os)
throws SQLException
- Specified by:
outputContentColumn in class DatabaseContentStore
- Throws:
SQLException
Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.