java.lang.Object | |
↳ | com.atlassian.jira.component.ComponentAccessor |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
Provides static methods for accessing JIRA's managed components — that is, the components in the PicoContainer.
Normally, developers should get the dependencies injected into the constructor of the calling class by Pico; however, this utility provides access for when that is impossible or impractical. Examples include:IllegalStateException
that they
are getting in a unit test should read the documentation for the MockComponentWorker
in the
jira-tests
artifact for instructions.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ComponentAccessor.Worker |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieves and returns the attachment path instance
| |||||||||||
Retrieves and return the bulk operation manager instance
| |||||||||||
Retrieves and returns the
ChangeHistoryManager manager instance | |||||||||||
Retrieves and returns the column layout manager instance
| |||||||||||
Returns the core component which is stored in JIRA's Dependency Injection container under the key that is the given class.
| |||||||||||
Returns the core component of the given Type (a Class or an Interface) which is stored in JIRA's
Dependency Injection container.
| |||||||||||
Retrieves and returns the field layout manager
| |||||||||||
Retrieves and returns the field screen manager instance
| |||||||||||
Retrieves and returns the field screen renderer factory instance
| |||||||||||
Retrieves and returns the index path manager instance
| |||||||||||
Returns the IssueIndexManager component.
| |||||||||||
Returns the IssueLinkManager component.
| |||||||||||
Retrieves and returns the issue service instance
| |||||||||||
Retrieves and returns the issue type scheme manager instance
| |||||||||||
Retrieves and returns the issue type screen scheme manager instance
| |||||||||||
Retrieves and returns the mail server manager instance
| |||||||||||
Retrieves and returns the move subtask operation manager instance
| |||||||||||
Retrieves and returns a public component from OSGi land via its class name.
| |||||||||||
Retrieves and returns the project component manager instance
| |||||||||||
Retrieves and returns the project factory instance
| |||||||||||
Retrieves the RendererManager component.
| |||||||||||
Retrieves and returns the subtask manager instance
| |||||||||||
Retrieves and returns the translation manager instance
| |||||||||||
Retrieves and returns the user preferences manager instance
| |||||||||||
Retrieves and returns the user preferences manager instance
| |||||||||||
Retrieves and returns the vote manager instance
| |||||||||||
Retrieves and returns the watcher manager instance
| |||||||||||
Retrieves and returns the web resource manager instance
| |||||||||||
Retrieves and returns the web resource URL provider instance
| |||||||||||
Retrieves and returns the workflow scheme manager instance
| |||||||||||
Retrieves and returns the worklog manager instance
| |||||||||||
This is called during system bootstrap to initialise this static helper class.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Retrieves and returns the attachment path instance
Retrieves and return the bulk operation manager instance
Retrieves and returns the ChangeHistoryManager
manager instance
Retrieves and returns the column layout manager instance
Returns the core component which is stored in JIRA's Dependency Injection container under the key that is the given class.
In practise, this is the same as getComponentOfType(Class)
except it will fail faster if the
given Class is not a known component key (it also has a shorter and more meaningful name).
Please note that this method only gets components from JIRA's core Pico Container. That is, it retrieves core components and components declared in Plugins1 plugins, but not components declared in Plugins2 plugins.
componentClass | class to find a component instance by |
---|
Returns the core component of the given Type (a Class or an Interface) which is stored in JIRA's Dependency Injection container.
First it tries to find the component using the given Class as a key (like getComponent(Class)
),
however, if this fails then it will try to find a unique component that implements/extends the given Class.
This seems unlikely to be useful, but is included for now, for completeness and backward compatibility.
Please note that this method only gets components from JIRA's core Pico Container. That is, it retrieves core components and components declared in Plugins1 plugins, but not components declared in Plugins2 plugins.
componentClass | class to find a component instance by |
---|
Retrieves and returns the field layout manager
Retrieves and returns the field screen manager instance
Retrieves and returns the field screen renderer factory instance
Retrieves and returns the index path manager instance
Returns the IssueIndexManager component.
Returns the IssueLinkManager component.
Retrieves and returns the issue service instance
Retrieves and returns the issue type scheme manager instance
Retrieves and returns the issue type screen scheme manager instance
Retrieves and returns the mail server manager instance
Retrieves and returns the move subtask operation manager instance
Retrieves and returns a public component from OSGi land via its class name. This method can be used to retrieve a component provided via a plugins2 OSGi bundle. Please note that components returned via this method should NEVER be cached (for example, by saving it in a static field) as they may be refreshed at any time as a plugin is enabled/disabled or the componentManager is reinitialised (after an XML import).
It is important to note that this only works for public components. That is components withpublic="true"
declared in their XML configuration. This means that they are available for other plugins to import.
A example use case for this method is the dashboards plugin. In several areas in JIRA we may want to
render gadgets via the com.atlassian.gadgets.view.GadgetViewFactory. Whilst the interface for this
component is available in JIRA core, the implementation is provided by the dashboards OSGi bundle. This method
will allow us to access it.componentClass | class to find an OSGi component instance for |
---|
Retrieves and returns the project component manager instance
Retrieves and returns the project factory instance
Retrieves the RendererManager component.
Retrieves and returns the subtask manager instance
Retrieves and returns the translation manager instance
Retrieves and returns the user preferences manager instance
Retrieves and returns the user preferences manager instance
Retrieves and returns the vote manager instance
Retrieves and returns the watcher manager instance
Retrieves and returns the web resource manager instance
Retrieves and returns the web resource URL provider instance
Retrieves and returns the workflow scheme manager instance
Retrieves and returns the worklog manager instance
@Internal
classes and interfaces can not expect to be compatible with any version
other than the version they were compiled against (even minor version and milestone releases may break binary
compatibility with respect to @Internal
elements).
This is called during system bootstrap to initialise this static helper class. Plugin developers should never call this in production code, although it is useful to put a mock Worker in here inside unit tests.
componentAccessorWorker | The worker that this static class delegates to in order to do actual work. |
---|