Adding and importing components in JIRA
JIRA has a component system that has many Service classes and Manager classes that are registered in PicoContainer
and are available for use by the core classes and plugins alike. It makes sense sometimes to add custom components to that component system that can then be used with the other modules in the same plugin or shared by other plugins.
In this recipe, we will see how we can add a new component in JIRA and how we can consume them from within the plugin and from a separate plugin.
Getting ready
Create a skeleton plugin using the Atlassian Plugin SDK. For the example, we will use the RedirectAction
webwork module used in the Redirecting to a different page in webwork actions recipe.
How to do it...
First, let us see how we can define a component and use it in the different modules within the same plugin. In our example, we will define a sample component and use the methods exposed by it in the RedirectAction
webwork. Following are the steps:
Create...