OpenLSD ENOpenLSD

Download at SourceForge.net

ConceptLogic Technical Aspects Future Plan Howto Benchmarks
Home OpenLSD OpenLSM OpenR66

HowTo-Extend-OpenLSD

How to create one application

Here is the first attempt to start what will be later on a long documentation on how to extend OpenLSD to fit business needs. The objective right now is not to make the documentation as complete as possible but to show the main ideas.

1)      Identify the extension on database for the LSDDOCUMENT table

2)      Extend by implementing the LSDBusiness class (see example with BusinessImpl:openlsd.business.LSDBusinessImpl.java)

3)      Extend or adapt the interface of servlet functions (see example in WebSupport:openlsd.web.* and in OpenLSDWebImpl project)

4)      Finally create the new OpenLSD-Impl.jar that will replace the original one with your business and correct openlsd-db config file.

You will have to take care about the main problem which is to obtain a new index when inserting a document in the system in an efficient way, both for parallelism (multiple import support) and for the ability to take care about deleted documents and so “defragmentation” on the storage.

I try in my current implementation to cover both problems. So take care to retry to keep those implementations, except if you know what you do.

 

How to extend to a new database support

To extend to another database support (that is what I did for PostGreSQL for instance), here are the main points:

  • Create a static value that identify the database resource in LSDConstants.java:

      /**

       * Type of DB: MySQL

       */

      public static final int typeMySQL = 0;

      /**

       * Type of DB: Oracle

       */

      public static final int typeOracle = 1;

      /**

       * Type of DB: PostGreSQL

       */

      public static final int typePostGreSQL = 2;

  • Create a new directory and class in Client:openlsd.database.data.xxx as the one from mysql or oracle or postgresql(Client:openlsd.database.data.mysql.LSDMySQLSpecific.java)
  • Modify the class that masks the underlying database for specific sql codes (Client:openlsd.database.data.LSDSpecific.java)