Changes between Version 10 and Version 11 of PluginDevelopmentGuide


Ignore:
Timestamp:
09.04.2013 01:16:06 (7 years ago)
Author:
jri
Comment:

Plugin configuration

Legend:

Unmodified
Added
Removed
Modified
  • PluginDevelopmentGuide

    v10 v11  
    264264Apr 6, 2013 11:38:40 PM de.deepamehta.core.impl.MigrationManager runMigration 
    265265INFO: Updating migration number (1) 
    266 Apr 6, 2013 11:38:40 PM de.deepamehta.core.impl.AttachedTopic update 
    267 INFO: Updating topic 2690 (new topic (id=-1, uri="", typeUri="dm4.core.plugin_migration_nr", value="1", composite={})) 
    268 Apr 6, 2013 11:38:40 PM de.deepamehta.core.impl.AttachedDeepaMehtaObject updateSimpleValue 
    269 INFO: ### Changing simple value of topic 2690 from "0" -> "1" 
    270266Apr 6, 2013 11:38:40 PM de.deepamehta.core.impl.PluginImpl registerListeners 
    271267INFO: Registering listeners of plugin "DeepaMehta 4 Tagging" at DeepaMehta 4 core service ABORTED -- no listeners implemented 
     
    386382You as the developer know 2 things about your plugin: a) Which plugin version relies on which data model version, and b) How to transform the database content in order to advance from a given data model version to the next. So, when you ship your plugin you must equip it with 2 things: 
    387383 
    388     * The information what data model version the plugin requires. 
     384    * The information what data model version the plugin relies on. 
    389385    * All the migrations required to update to that data model version. 
    390386 
     
    400396 
    401397Thus, the users database will always be compatible with the installed version of the plugin. Furthermore, the user is free to skip versions when upgrading the plugin. 
     398 
     399=== Plugin configuration === 
     400 
     401If your plugin comes with its own data model you must tell DeepaMehta the data model version it relies on. To do so, set the `requiredPluginMigrationNr` configuration property in the `plugin.properties` file, e.g.: 
     402 
     403{{{ 
     404#!txt 
     405requiredPluginMigrationNr=2 
     406}}} 
     407 
     408DeepaMehta's migration machinery takes charge of running the plugin's migrations up to that configured number. If your plugin comes with no data model, you can specify `0` resp. omit the `requiredPluginMigrationNr` property as `0` is its default value. 
     409 
     410Usually each plugin has its own `plugin.properties` file. It allows the developer to configure certain aspects of the plugin. The name of the `plugin.properties` file and its path within the plugin directory is fixed: 
     411 
     412{{{ 
     413#!txt 
     414dm4-myplugin/src/main/resources/plugin.properties 
     415}}} 
     416 
     417If no `plugin.properties` file is present, the default configuration values apply. 
     418 
     419=== Writing migrations === 
     420