Skip to main content
Skip table of contents

Setting Up the Integration

To start using Structure in your plugin:

 Add dependency to your pom.xml

Figure out the version of the API that you need – it may depend on your JIRA and Structure plugin version.

To use API classes, add the following dependency:

CODE
<dependency>
  <groupId>com.almworks.jira.structure</groupId>
  <artifactId>structure-api</artifactId>
  <version>17.0.0</version>
  <scope>provided</scope>
</dependency>

Import StructureComponents

In your atlassian-plugin.xml, use <component-import> module to import StructureComponents service. This service provides access to all other Structure services.

Alternatively, you can import specific services.

CODE
<component-import key="structure-components" interface="com.almworks.jira.structure.api.StructureComponents"/>

Have Structure API service injected into your component

CODE
public class MyClass {
  private final StructureManager structureManager;

  public MyClass(StructureComponents structureComponents) {
    structureManager = structureComponents.getStructureManager();
  }

  ...
}

 

This is it! Continue to the list of Structure Services to see which service you need to work with. Other articles in this section provide examples for specific use cases.

For a production plugin, consider Controlling Compatibility. For a standalone plugin, which can work without Structure, read about Making Structure Dependency Optional.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.