|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.uwyn.rife.database.DbQueryManager
com.uwyn.rife.cmf.dam.contentstores.DatabaseRawStore
public abstract class DatabaseRawStore
| Constructor Summary | |
|---|---|
DatabaseRawStore(Datasource datasource)
|
|
| Method Summary | ||
|---|---|---|
protected boolean |
_deleteContentData(Delete deleteContentInfo,
Delete deleteContentChunk,
int id)
|
|
protected int |
_getSize(Select retrieveSize,
int id)
|
|
protected boolean |
_hasContentData(Select hasContentData,
int id)
|
|
protected boolean |
_install(CreateTable createTableContentInfo,
CreateTable createTableContentChunk)
|
|
protected boolean |
_remove(DropTable dropTableContentInfo,
DropTable dropTableContentChunk)
|
|
protected void |
_serveContentData(Select retrieveContentChunks,
ElementSupport element,
int id)
|
|
protected boolean |
_storeContentData(Insert storeContentInfo,
Insert storeContentChunk,
int id,
Content content,
ContentTransformer transformer)
|
|
protected
|
_useContentData(Select retrieveContentChunks,
int id,
ContentDataUser user)
|
|
protected void |
addMimeType(MimeType mimeType)
|
|
String |
getContentForHtml(int id,
ContentInfo info,
ElementSupport element,
String serveContentExitName)
Retrieves a content data representation for use in html. |
|
protected String |
getContentSizeColumnName()
|
|
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 DbPreparedStatement |
getStreamPreparedStatement(Query query,
DbConnection connection)
|
|
Collection<MimeType> |
getSupportedMimeTypes()
Returns the collection of mime types that the content store supports. |
|
protected void |
serveChunks(DbResultSet resultset,
OutputStream os,
int size)
|
|
protected int |
storeChunks(Insert storeContentChunk,
int id,
InputStream data)
|
|
protected int |
storeChunksNoStream(Insert storeContentChunk,
int id,
InputStream data)
|
|
| 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.ContentStore |
|---|
deleteContentData, getSize, hasContentData, install, remove, serveContentData, storeContentData, useContentData |
| Constructor Detail |
|---|
public DatabaseRawStore(Datasource datasource)
| Method Detail |
|---|
protected void addMimeType(MimeType mimeType)
public Collection<MimeType> getSupportedMimeTypes()
ContentStore
getSupportedMimeTypes in interface ContentStorepublic String getContentType(ContentInfo contentInfo)
ContentStoreContentInfo.
getContentType in interface ContentStorecontentInfo - the content info instance for which the content type
has to be generated
public Formatter getFormatter(MimeType mimeType,
boolean fragment)
ContentStoreFormatter instance that will be used to load and
to format the content data.
getFormatter in interface ContentStoremimeType - 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
public String getContentForHtml(int id,
ContentInfo info,
ElementSupport element,
String serveContentExitName)
throws ContentManagerException
ContentStoreThis 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.
getContentForHtml in interface ContentStoreid - 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.
ContentManagerException - if an unexpected error occurred
protected boolean _install(CreateTable createTableContentInfo,
CreateTable createTableContentChunk)
throws ContentManagerException
ContentManagerException
protected boolean _remove(DropTable dropTableContentInfo,
DropTable dropTableContentChunk)
throws ContentManagerException
ContentManagerException
protected boolean _deleteContentData(Delete deleteContentInfo,
Delete deleteContentChunk,
int id)
throws ContentManagerException
ContentManagerException
protected int _getSize(Select retrieveSize,
int id)
throws ContentManagerException
ContentManagerException
protected boolean _hasContentData(Select hasContentData,
int id)
throws ContentManagerException
ContentManagerExceptionprotected String getContentSizeColumnName()
protected boolean _storeContentData(Insert storeContentInfo,
Insert storeContentChunk,
int id,
Content content,
ContentTransformer transformer)
throws ContentManagerException
ContentManagerException
protected int storeChunks(Insert storeContentChunk,
int id,
InputStream data)
throws IOException
IOException
protected int storeChunksNoStream(Insert storeContentChunk,
int id,
InputStream data)
throws IOException
IOException
protected <ResultType> ResultType _useContentData(Select retrieveContentChunks,
int id,
ContentDataUser user)
throws ContentManagerException
ContentManagerException
protected DbPreparedStatement getStreamPreparedStatement(Query query,
DbConnection connection)
protected void _serveContentData(Select retrieveContentChunks,
ElementSupport element,
int id)
throws ContentManagerException
ContentManagerException
protected void serveChunks(DbResultSet resultset,
OutputStream os,
int size)
throws SQLException,
IOException
SQLException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||