What I did to get my arms around building my first custom store.

I started with the slide standard stores at org.apache.slide.store.txfile.TxFileContentStore and org.apache.slide.store.txfile.TxXMLFileDescriptorsStore

I extended those two and simply added some additional logging to let me trace through normal operations of Slide in the logs to let me see what methods were called in what sequence so I could design my custom store to go against an external document managment system and its API.

I went through both and added some System.out.println() statements to every public method in each store. Most methods have a "Uri uri" argument and I would play with the println statements to see what was going on (i.e. uri.toString(), etc.). Then I would exercise slide and review the logs.

It became obvious that integration with an external repository meant mapping these methods to the external API's methods. What also became obvious was that not all the activity in Slide does in fact map to the external API, so for slide to work properly I decided to leave much of Slide working as it does OTB and treat the external repository as a service. That approach let me read and write content, and to capture events that were applicable, but not to try to change Slide's inner workings. I stayed with the Slide XML Descriptor Store and only modified a few of its methods where they mapped to the external API.

Good luck, Ollie

GetYourArmsAroundIt (last edited 2009-09-20 22:02:45 by localhost)