Overriding JIRA's default components in plugins
JIRA uses PicoContainer
as a central object factory. PicoContainer
is responsible for instantiating objects and resolving their constructor dependencies. Within JIRA a lot of Manager, Service, and Utility classes are already registered with PicoContainer
. The registration happens in the ComponentRegistrar
class' registerComponents()
method and these classes can be retrieved via dependency injection or using the ComponentManager
class' getter methods or the getComponentInstanceOfType()
method.
While it is true that most of the plugins can work with these already-registered components and the new ones created using the Component Plugins module, sometimes the need arises to override an existing component registered within JIRA. In this recipe, we will see how to do that.
Getting ready
Create a skeleton plugin using the Atlassian Plugin SDK. The plugin must be v1.
How to do it...
The overriding of existing components in JIRA is also done using the...