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 ComponentRegistrar
class' registerComponents()
method and these classes can be retrieved via dependency injection or using 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 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 Atlassian Plugin SDK. The plugin must be v1.
How to do it...
The overriding of existing components in JIRA is also done using the Component Plugins...