Changes between Version 10 and Version 11 of PluginDevelopmentGuide
- Timestamp:
- 09.04.2013 01:16:06 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PluginDevelopmentGuide
v10 v11 264 264 Apr 6, 2013 11:38:40 PM de.deepamehta.core.impl.MigrationManager runMigration 265 265 INFO: Updating migration number (1) 266 Apr 6, 2013 11:38:40 PM de.deepamehta.core.impl.AttachedTopic update267 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 updateSimpleValue269 INFO: ### Changing simple value of topic 2690 from "0" -> "1"270 266 Apr 6, 2013 11:38:40 PM de.deepamehta.core.impl.PluginImpl registerListeners 271 267 INFO: Registering listeners of plugin "DeepaMehta 4 Tagging" at DeepaMehta 4 core service ABORTED -- no listeners implemented … … 386 382 You 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: 387 383 388 * The information what data model version the plugin re quires.384 * The information what data model version the plugin relies on. 389 385 * All the migrations required to update to that data model version. 390 386 … … 400 396 401 397 Thus, 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 401 If 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 405 requiredPluginMigrationNr=2 406 }}} 407 408 DeepaMehta'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 410 Usually 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 414 dm4-myplugin/src/main/resources/plugin.properties 415 }}} 416 417 If no `plugin.properties` file is present, the default configuration values apply. 418 419 === Writing migrations === 420