Service Provider Interface

On this page:

Who can use this information?
This document is intended for app vendors integrating their apps with Configuration Manager through the Service Provider Interface.

Introduction

Configuration Manager for Jira (CMJ) supports seamless migration of Jira configuration and data between instances. To deliver the same level of consistency, integrity, and ease of use for app data, we introduce the Configuration Manager Service Provider Interface (SPI). This interface provides the tools necessary for moving app configuration and data between different instances of Jira.

The app configuration may be arbitrary but may also contain references to other configuration elements in Jira (priorities, resolutions, custom fields, filters, etc.). The SPI provides the means for collecting such references on the source instance and properly resolving them on the target instance. The diagram below illustrates the collect-and-resolve process.

API Reference

If you need more technical information on the latest SPI packages and interfaces, follow the link to read the complete API reference.

Get Started

This part aims to guide you through the initial setup of the Service Provider Interface (SPI).

  1. Аdd the SPI as a maven dependency in your pom.xml:

1 2 3 4 5 6 7 <!-- CMJ SPI library --> <dependency> <groupId>com.botronsoft.cmj.spi</groupId> <artifactId>configuration-manager-spi</artifactId> <version>${cmj.spi.version}</version> <scope>provided</scope> </dependency>

2. You need to add the SPI package dependency:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 <build> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <version>${amps.version}</version> <configuration> ..... <instructions> <DynamicImport-Package> com.botronsoft.cmj.spi.*;version="${cmj.spi.version}";resolution:=optional, </DynamicImport-Package> <Import-Package> .... !com.botronsoft.cmj.spi.*, .... </Import-Package> </instructions> ..... </configuration> </plugin> </plugins> </build>

3. Set the Maven property cmj.spi.version to the lowest possible version of the SPI - for example, 1.0.0.

Increment the version when you need new features of the SPI. This will ensure compatibility with a large set of Configuration Manager releases, as older releases come with an older version of the SPI. There is no need to compile to a newer version unless you need some new features, as the SPI is backward compatible.

DynamicImport-Package Usage

Important

Make sure that DynamicImport-Package is used instead of Import-Package. Otherwise, the SPI-related packages may not be correctly resolved at runtime.

If building with Atlassian SDK 8.0.0+, you also need to add the instruction “!com.botronsoft.cmj.spi.*” to Import-Package.

SPI Interfaces

Next, implement any of the SPI interfaces to support your configuration and data. For more information, check the list below.

Custom Fields

Workflows

Project Configuration and Data

Dashboards

Global Configuration

License

The Configuration Manager SPI is licensed under the Creative Commons license (CC BY 4.0).