AnsweredAssumed Answered

Using Database as Alfresco ContentStore

Question asked by aliosha79 on Feb 16, 2015
Latest reply on Feb 16, 2015 by mrogers
i'm working with Alfresco 4.2 and i need to use a table in my database as document content store.
Collecting some informations hither and thither over the internet, i read that i have just to implement my custom DBContentStore DBContentWriter and DBContentReader classes. Someone told me to  take as reference the FileContentStore class.
I need some help to mapping the FileContentStore in order to match my new class.
For example:
The DBContentWriter has to extend AbstractContentWriter and in the API docs i read that the only methods i have to overwrite are:
getReader() to create a reader to the underlying content
getDirectWritableChannel() to write content to the repository.

What about the second method? (  protected WritableByteChannel getDirectWritableChannel() )
it has to return a WritableByteChannel.
How can i get the WritableByteChannel starting from a database connection? ie MySQL database?

What about the AbstractContent store? Should i just have to override the getWriter or getWriterInternal methods?

The same for AbstractContentReader.