Package rife.cmf.dam.contentstores
Class DatabaseImageStore
java.lang.Object
rife.database.DbQueryManager
rife.cmf.dam.contentstores.DatabaseContentStore
rife.cmf.dam.contentstores.DatabaseImageStore
- All Implemented Interfaces:
Cloneable,ContentStore
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean_storeContentData(Insert storeContent, int id, Content content, ContentTransformer transformer) protected void_useContentData(Select retrieveContent, int id, ContentDataUserWithoutResult user) protected <ResultType>
ResultType_useContentDataResult(Select retrieveContent, int id, ContentDataUser<ResultType> user) getContentForHtml(int id, ContentInfo info, Context context, Route route) Retrieves a content data representation for use in html.getContentType(ContentInfo contentInfo) Generates the HTTP content type that corresponds best to the information in the providedContentInfo.protected intprotected voidoutputContentColumn(ResultSet resultSet, OutputStream os) protected booleanstoreTypedData(Insert storeContent, int id, byte[] data) Methods inherited from class rife.cmf.dam.contentstores.DatabaseContentStore
_deleteContentData, _getSize, _hasContentData, _install, _remove, _serveContentData, addMimeType, getSupportedMimeTypesMethods inherited from class rife.database.DbQueryManager
clone, executeFetchAll, executeFetchAll, executeFetchAll, executeFetchAll, executeFetchAllBeans, executeFetchAllBeans, executeFetchFirst, executeFetchFirst, 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, executeResultQuery, executeUpdate, executeUpdate, executeUpdate, executeUseFirstAsciiStream, executeUseFirstAsciiStream, executeUseFirstBinaryStream, executeUseFirstBinaryStream, executeUseFirstCharacterStream, executeUseFirstCharacterStream, fetch, fetch, fetch, fetchAll, fetchAll, getConnection, getDatasource, inTransaction, inTransaction, reserveConnectionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface rife.cmf.dam.ContentStore
deleteContentData, getFormatter, getSize, hasContentData, install, remove, serveContentData, storeContentData, useContentData, useContentDataResult
-
Constructor Details
-
DatabaseImageStore
-
-
Method Details
-
getContentType
Description copied from interface:ContentStoreGenerates the HTTP content type that corresponds best to the information in the providedContentInfo.- Parameters:
contentInfo- the content info instance for which the content type has to be generated- Returns:
- the generated content type
-
getContentForHtml
public String getContentForHtml(int id, ContentInfo info, Context context, Route route) throws ContentManagerException Description copied from interface:ContentStoreRetrieves 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 generatedcontext- an active web engine contextroute- a route that leads to arife.cmf.elements.ServeContentelement- 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 void _useContentData(Select retrieveContent, int id, ContentDataUserWithoutResult user) throws ContentManagerException - Throws:
ContentManagerException
-
_useContentDataResult
protected <ResultType> ResultType _useContentDataResult(Select retrieveContent, int id, ContentDataUser<ResultType> user) throws ContentManagerException - Throws:
ContentManagerException
-
outputContentColumn
- Specified by:
outputContentColumnin classDatabaseContentStore- Throws:
SQLException
-