Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
top
top

In This Section

Table of Contents
maxLevel2

...

The introduction of plugins significantly eases migration issues because of the tight coupling between the software version of a plugin and the data model it uses. The plugin itself is responsible for implementing proper data model migration and XperienCentral offers an easy API to implement this.

Version number

Each plugin has a version number that consists of three numbers. The version number has a meaning and it is very important to use it properly because it tells users of the plugin the kind of changes they can expect between two separate versions of the plugin. The three parts of the version number have the following meaning:

...


When defining version numbers for your plugin, be sure that they conform to the development guidelines (G017 and G019 in particular).

 

Back to Top

 

...

Plugin Updates

When updating a plugin, the version number of the plugin must always be updated. Depending on the type of change the major, minor or micro version number must be updated:

...

Note

Proper versioning of your plugin is a required guideline - see G017 and G019.

 

Back to Top

 

...

Changes in the Data Model

The version number plays an important role in data model migration. A plugin version is tied to a particular data model and when the data model is updated, the plugin’s version should also change. Using the version number it is possible to implement the migration logic that is needed to upgrade content managed by the entity manager created from an x.y.z version of the plugin to x.y.z+1.

...

Note
  • The upgradeContent method will only be invoked on nodes managed by the Entity Manager.
  • The upgradeContent method is static. To use the Entity Manager (or any other service) in a static method, see Using Services in Static Methods.
  • Proper handling of content migration is a required guideline - see G020.

Explicitly setting the Platform Dependency

By default, the minimum and maximum version of XperienCentral that a plugin can run on is calculated as follows: If the version of XperienCentral for which you build the plugin is x.y.z, then the minimum version of XperienCentral on which the plugin can run is x.y and the maximum version is (x+1).0. It is also possible to explicity set the minimum and maximum versions of XperienCentral on which a plugin can run in the POM file using the setting properties XperienCentral.wcb-min-version and XperienCentral.wcb-max-version. For example:

...


If webmanager.wcb.min-version and webmanager.wcb.max-version are not specified, the default versions as described above are calculated and used.

Example

In this section an example of a "Keyword" plugin that changes its node type definition (data model) over time. The following updates to the node type definition are performed:

...