Skip to main content
Skip table of contents

Java API - Getting started


Java developer section


All the steps in this section are detailled in Java setup.


This is the minimal pom structure. This includes the module dependency, OSGI instructions and Maven repository reference :

<project ...>




Service reference

This code used Atlassian Plugin Scanner. It allows you to inject a service from another plugin (Element PanelContentService here). 

public class MyService {
    private final PanelContentService panelContentService;
    public MyService(PanelContentService panelContentService) {
        this.panelContentService = panelContentService;
    public void doStuff() throws ElementsException {
        Panel panel = panelContentService.getPanel(IssueRef.byKey("ISSUE-1"), PanelRef.byName("My Panel"));


ScriptRunner user section

Example script

All the steps in this section are detailled in ScriptRunner setup.

This code below contains the minimum to reference and use a service in Elements Checklist.

This references the PanelRenderingService and generates the default HTML content for a panel

import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.plugin.PluginAccessor;

PluginAccessor pluginAccessor = ComponentAccessor.getPluginAccessor();
Class panelRenderingServiceClass = pluginAccessor.getClassLoader().findClass("");

def panelRenderingService = ComponentAccessor.getOSGiComponentInstanceOfType(panelRenderingServiceClass);

def htmlContent = panelRenderingService.renderPanel(IssueRef.byKey("test-36"), PanelRef.byName("Item List"))

return htmlContent
JavaScript errors detected

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

If this problem persists, please contact our support.