Last updated Mar 27, 2024

Active Objects plugin module

Purpose of this Module Type

The Active Objects plugin module allows you to use the Active Objects service to persist data using the Active Objects library.

Configuration

The root element for the Active Objects plugin module is ao. It allows the following attributes and child elements for configuration:

Attributes

Name

Description

namespace

A namespace for the plugin module. If present, this value is used to generate unique portions of the AO table names (see Table names).

While not required, we recommend that you add a namespace value. If not present, an internal form of the plugin key is used, which can potentially change.

Note that changing the plugin key (or this namespace value) causes new tables to be created based on the new table names.

Default: The plugin key.

key

The identifier of the plugin module. This key must be unique within the plugin where it is defined.
INFO: Sometimes, in other contexts, you may need to uniquely identify a module. Do this with the complete module key.

A module with key fred in a plugin with key com.example.modules will have a complete key of com.example.modules:fred

which serves as the identifier of the component.

Required.

Default: N/A.

i18n-name-key

The localisation key for the human-readable name of the plugin module.

name

The human-readable name of the plugin module.

Default: The plugin key.

Elements

Name

Description

entity

Fully qualified name of an entity to be managed by the module.

Required.

Default: N/A.

upgradeTask

Fully qualified name of an upgrade task to be run on activation of the module.

Default: N/A.

description

The description of the plugin module.

The 'key' attribute can be specified to declare a localisation key for the value instead of text in the element body.

Example

Here is an example atlassian-plugin.xml file containing a single public component:

Module definition example

1
2
<atlassian-plugin name="Hello World" key="example.plugin.helloworld" plugins-version="2">
  <plugin-info>
    <description>A basic Active Objects module test</description>
    <vendor name="Atlassian Software Systems" url="http://www.atlassian.com"/>
    <version>1.0</version>
  </plugin-info>

  <ao key="ao-module">
    <description>The AO module for this plugin.</description>
    <entity>com.myapp.MyEntity</entity>
    <upgradeTask>com.myapp.upgrades.v1.Version1UpgradeTask</upgradeTask>
  </ao>
</atlassian-plugin>

Notes

There is a document explaining how to use the plugin. Also have a look at the sample Todo plugin developed which is a simple example plugin using Active Object you can build upon.

Rate this page: