Page History
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:
Numbered Headings | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Add dependency to your |
Code Block |
---|
<dependency> <groupId>com.almworks.jira.structure</groupId> <artifactId>structure-api</artifactId> <version>2.0.0</version> <scope>provided</scope> </dependency> |
Import an interface
In your atlassian-plugin.xml, use <component-import> module to import the interfaces that you need.
Tip |
---|
You can import StructureServices and get all other interfaces from there. |
Code Block |
---|
<component-import key="structure-services" interface="com.almworks.jira.structure.api.StructureServices"/> |
Have Structure API service injected into your component.
Code Block |
---|
public class MyClass { private final StructureManager structureManager; public MyClass(StructureServices structureServices) { structureManager = structureServices.getStructureManager(); } ... } |
Panel |
---|
Next: Learn API Basics |
Overview
Content Tools
Apps
Tasks