To start using Structure in your plugin:
Add dependency to your |
<dependency> <groupId>com.almworks.jira.structure</groupId> <artifactId>structure-api</artifactId> <version>16.0.0</version> <scope>provided</scope> </dependency> |
Note that there are Additional Libraries Used in Structure API |
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.
<component-import key="structure-components" interface="com.almworks.jira.structure.api.StructureComponents"/> |
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. |