Adding and importing components in JIRA
JIRA has a component system that has so 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 that from within the plugin and from a separate plugin.
Getting ready
Create a Skeleton plugin using Atlassian Plugin SDK. For the example, we will use the RedirectAction
webwork module used in the previous recipe.
How to do it...
First, let us see how we can define a component and use them 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
. Following are the steps:
Create an interface with the required method definitions...