Structure provides a Java API that lets other plugins interact with the Structure data. The API is accessed through a few services that you can have injected into your components.
To start using Structure in your plugin:
Add dependency to your
|
<dependency> <groupId>com.almworks.jira.structure</groupId> <artifactId>structure-api</artifactId> <version>7.2.0</version> <scope>provided</scope> </dependency> |
In your atlassian-plugin.xml, use <component-import> module to import the interfaces that you need.
You can import StructureServices and get all other interfaces from there. |
<component-import key="structure-services" interface="com.almworks.jira.structure.api.StructureServices"/> |
public class MyClass { private final StructureManager structureManager; public MyClass(StructureServices structureServices) { structureManager = structureServices.getStructureManager(); } ... } |
Next: Learn API Basics |