Loading classes and services

Loading plugin classes

To load classes from specific plugin, you must use WithPlugin annotation with plugin key (or multiple keys) as argument.

Using plugin services

To bind plugin service to script variable, you must use PluginModule annotation without any arguments. Not all services might be available this way.

Shortcut for system services

You can use StandardModule annotation to bind Jira services. It's pretty much a shortcut for ComponentAccessor.getComponent(ServiceClass)


Example with all annotations
import com.atlassian.greenhopper.service.rapid.view.RapidViewService
import com.atlassian.jira.security.JiraAuthenticationContext

RapidViewService rapidViewService
JiraAuthenticationContext authenticationContext

return rapidViewService.getRapidView(authenticationContext.loggedInUser, 1605L).get()