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
-
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 int
protected void
outputContentColumn
(ResultSet resultSet, OutputStream os) protected boolean
storeTypedData
(Insert storeContent, int id, byte[] data) Methods inherited from class rife.cmf.dam.contentstores.DatabaseContentStore
_deleteContentData, _getSize, _hasContentData, _install, _remove, _serveContentData, addMimeType, getSupportedMimeTypes
Methods 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, reserveConnection
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:ContentStore
Generates 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: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 generatedcontext
- an active web engine contextroute
- a route that leads to arife.cmf.elements.ServeContent
element- 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:
outputContentColumn
in classDatabaseContentStore
- Throws:
SQLException
-