|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.ComponentManager
public class ComponentManager
This component manager uses PicoContainer to resolve all the dependencies between components.
It is responsible for initialising a large number of components in JIRA. Any components defined here may be injected via a constructor. The ComponentManager also has various static accessor methods for non-Pico-managed objects, eg.ComponentManager.getInstance().getProjectManager()
. These should only be used if constructor based
injection is not feasible.
More information can be found at the picocontainer website.
Nested Class Summary | |
---|---|
static interface |
ComponentManager.State
The state of the ComponentManager . |
Field Summary | |
---|---|
static String |
EXTENSION_PROVIDER_PROPERTY
|
Method Summary | ||
---|---|---|
void |
bootstrapPluginsSystem()
Bootstrap the cut down JIRA plugin system. |
|
void |
buildBootstrapPICOContainer()
Initialization registers components for the bootstrap loading of JIRA. |
|
ApplicationProperties |
getApplicationProperties()
Retrieves and returns the application properties. |
|
AssigneeResolver |
getAssigneeResolver()
Retrieves and returns the assignee resolver instance |
|
AttachmentManager |
getAttachmentManager()
Retrieves and returns the attachment manager instance |
|
AttachmentPathManager |
getAttachmentPathManager()
Retrieves and returns the attachment path instance |
|
AvatarManager |
getAvatarManager()
|
|
BulkOperationManager |
getBulkOperationManager()
Retrieves and return the bulk operation manager instance |
|
ChangeHistoryManager |
getChangeHistoryManager()
Retrieves and returns the ChangeHistoryManager manager instance |
|
ColumnLayoutManager |
getColumnLayoutManager()
Retrieves and returns the column layout manager instance |
|
CommentManager |
getCommentManager()
Retrieves and returns the comment manager instance |
|
static
|
getComponent(Class<T> clazz)
Retrieves and returns a component which is an instance of given class. |
|
ComponentClassManager |
getComponentClassManager()
Deprecated. Use ComponentAccessor.getComponentClassManager() instead. Since v5.0. |
|
static
|
getComponentInstanceOfType(Class<T> clazz)
Retrieves and returns a component which is an instance of given class. |
|
static
|
getComponentsOfType(Class<T> clazz)
Returns all the components currently inside of Pico which are instances of the given class. |
|
static
|
getComponentsOfTypeMap(Class<T> iface)
Returns all the components currently inside Pico which are instances of the given class, mapping them to their component key. |
|
ConstantsManager |
getConstantsManager()
Retrieves and returns the constants manager |
|
org.picocontainer.PicoContainer |
getContainer()
Returns container |
|
com.atlassian.crowd.embedded.api.CrowdService |
getCrowdService()
|
|
CustomFieldManager |
getCustomFieldManager()
Retrieves and returns the custom field manager |
|
CvsRepositoryUtil |
getCvsRepositoryUtil()
Deprecated. |
|
EventTypeManager |
getEventTypeManager()
Retrieves and returns teh event type manager instance |
|
FieldLayoutManager |
getFieldLayoutManager()
Retrieves and returns the field layout manager |
|
FieldManager |
getFieldManager()
Deprecated. Use ComponentAccessor.getFieldManager() instead. Since v4.4. |
|
FieldScreenManager |
getFieldScreenManager()
Retrieves and returns the field screen manager instance |
|
FieldScreenRendererFactory |
getFieldScreenRendererFactory()
Retrieves and returns the field screen renderer factory instance |
|
FieldScreenSchemeManager |
getFieldScreenSchemeManager()
Retrieves and returns the field screen scheme manager instance |
|
FileIconBean |
getFileIconBean()
Retrieves and returns the file icon bean instance |
|
IndexLifecycleManager |
getIndexLifecycleManager()
Retrieves and returns the index lifecycle manager instance |
|
IssueIndexManager |
getIndexManager()
Retrieves and returns the issue index manager instance |
|
IndexPathManager |
getIndexPathManager()
Retrieves and returns the index path manager instance |
|
static ComponentManager |
getInstance()
Retuns a singleton instance of this class. |
|
IssueCreationHelperBean |
getIssueCreationHelperBean()
Retrieves and returns the Issue Creation Helper Bean instance. |
|
IssueFactory |
getIssueFactory()
Get an IssueFactory instance, particularly useful for obtaining Issue from |
|
IssueLinkManager |
getIssueLinkManager()
Retrieves and returns the issuel link manager instance NOTE: Needed especially for custom workflow conditions that check an issue's links for progression. |
|
IssueManager |
getIssueManager()
Retrieves and returns the issue manager instance |
|
IssueService |
getIssueService()
Retrieves and returns the issue service instance |
|
IssueTypeSchemeManager |
getIssueTypeSchemeManager()
Retrieves and returns the issue type scheme manager instance |
|
IssueTypeScreenSchemeManager |
getIssueTypeScreenSchemeManager()
Deprecated. Use ComponentAccessor.getIssueTypeScreenSchemeManager() instead. Since v5.0. |
|
IssueUpdater |
getIssueUpdater()
Retrieves and returns the issue updater instance NOTE: This method is only used for tests. |
|
JiraAuthenticationContext |
getJiraAuthenticationContext()
Retrieves and returns the JIRA authentication context instance |
|
JiraDurationUtils |
getJiraDurationUtils()
Retrieves and returns the JIRA duration utils instance |
|
JiraLocaleUtils |
getJiraLocaleUtils()
Retrieves and returns the JIRA locale utils instance |
|
MailingListCompiler |
getMailingListCompiler()
Retrieves and returns the mailing list compiler instance |
|
com.atlassian.mail.server.MailServerManager |
getMailServerManager()
Retrieves and returns the mail server manager instance |
|
MoveSubTaskOperationManager |
getMoveSubTaskOperationManager()
Retrieves and returns the move subtask operation manager instance |
|
org.picocontainer.MutablePicoContainer |
getMutablePicoContainer()
Returns container |
|
static
|
getOSGiComponentInstanceOfType(Class<T> clazz)
Retrieves and returns a public component from OSGi land via its class name. |
|
OutlookDateManager |
getOutlookDateManager()
|
|
PermissionContextFactory |
getPermissionContextFactory()
Retrieves and returns the permission context factory instance |
|
PermissionManager |
getPermissionManager()
Retrieves and returns the permission manager instance |
|
PermissionTypeManager |
getPermissionTypeManager()
Retrieves and returns the permission type manager instance |
|
com.atlassian.plugin.PluginAccessor |
getPluginAccessor()
|
|
com.atlassian.plugin.PluginController |
getPluginController()
|
|
com.atlassian.plugin.event.PluginEventManager |
getPluginEventManager()
|
|
com.atlassian.plugin.PluginSystemLifecycle |
getPluginSystemLifecycle()
Retrieves and returns the plugin system's lifecycle instance |
|
PortalPageManager |
getPortalPageManager()
|
|
PortalPageService |
getPortalPageService()
|
|
ProjectComponentManager |
getProjectComponentManager()
Retrieves and returns the project component manager instance |
|
ProjectFactory |
getProjectFactory()
Retrieves and returns the project factory instance |
|
ProjectManager |
getProjectManager()
Retrieves and returns the project manager instance |
|
RendererManager |
getRendererManager()
Retrieves and returns the renderer manager instance |
|
RepositoryManager |
getRepositoryManager()
Retrieves and returns the repository manager instance |
|
SchemePermissions |
getSchemePermissions()
Retrieves and returns the scheme permissions instance |
|
SearchProvider |
getSearchProvider()
Retrieves and returns the search provider instance |
|
SearchRequestAdminService |
getSearchRequestAdminService()
Retrieves the search request admin service |
|
SearchRequestFactory |
getSearchRequestFactory()
Retrieves a SearchRequestFactory |
|
SearchRequestManager |
getSearchRequestManager()
Deprecated. v3.13 please use SearchRequestService |
|
SearchRequestService |
getSearchRequestService()
Retrieves the search request service |
|
SearchService |
getSearchService()
Retrieves and returns the search provider instance |
|
ComponentManager.State |
getState()
What ComponentManager.State is the ComponentManager in. |
|
SubscriptionMailQueueItemFactory |
getSubscriptionMailQueueItemFactory()
Retrieves and returns the subscription mail queue item factory instance |
|
SubTaskManager |
getSubTaskManager()
Retrieves and returns the subtask manager instance |
|
TaskManager |
getTaskManager()
Returns the TaskManager |
|
TemplateManager |
getTemplateManager()
Retrieves and returns the template manager instance |
|
TranslationManager |
getTranslationManager()
Retrieves and returns the translation manager instance |
|
com.atlassian.security.auth.trustedapps.TrustedApplicationsManager |
getTrustedApplicationsManager()
|
|
UpgradeManager |
getUpgradeManager()
Retrieves and returns the upgrade manager instance |
|
UserPreferencesManager |
getUserPreferencesManager()
Retrieves and returns the user preferences manager instance |
|
UserPropertyManager |
getUserPropertyManager()
Retrieves and returns the user preferences manager instance |
|
UserUtil |
getUserUtil()
Retrieves and returns the user util instance |
|
com.atlassian.velocity.VelocityManager |
getVelocityManager()
Retrieves and returns the velocity manager instance |
|
VersionManager |
getVersionManager()
Retrieves and returns the version manager instance |
|
VoteManager |
getVoteManager()
Retrieves and returns the vote manager instance |
|
WatcherManager |
getWatcherManager()
Retrieves and returns the watcher manager instance |
|
com.atlassian.plugin.webresource.WebResourceManager |
getWebResourceManager()
Retrieves and returns the web resource manager instance |
|
WorkflowManager |
getWorkflowManager()
Retrieves and returns the workflow manager instance |
|
WorkflowSchemeManager |
getWorkflowSchemeManager()
Retrieves and returns the workflow scheme manager instance |
|
WorklogManager |
getWorklogManager()
Retrieves and returns the worklog manager instance |
|
void |
initialise()
Initialization registers components and then registers extensions. |
|
void |
quickStart()
This is here (outside of the initialise method) as the getComponentInstancesOfType method starts instantiating components and calls on the LicenseComponentAdpater which tries to get reference to this object using the getInstance() method. |
|
void |
refreshUpgradeManager()
Create a new UpgradeManager. |
|
void |
shutdown()
Shutdown. |
|
void |
start()
Adds license configuration in license manager. |
|
static void |
stopTenant(com.atlassian.multitenant.Tenant tenant)
This should only be called from LauncherContextListener when we are manipulating the lifecycle of the ComponentManager during multitenancy. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String EXTENSION_PROVIDER_PROPERTY
Method Detail |
---|
public void buildBootstrapPICOContainer()
public void bootstrapPluginsSystem()
public void initialise()
public void start()
public void quickStart()
getInstance()
method. That method returns null as the reference to this object does not exist
until the initialise method completes. So this method should be invoked after the initialise method completes
execution.
public void shutdown()
Shutdown
shutdown
in interface Shutdown
public ComponentManager.State getState()
ComponentManager.State
is the ComponentManager
in.
public org.picocontainer.PicoContainer getContainer()
public org.picocontainer.MutablePicoContainer getMutablePicoContainer()
public com.atlassian.plugin.webresource.WebResourceManager getWebResourceManager()
public RepositoryManager getRepositoryManager()
@Deprecated public CvsRepositoryUtil getCvsRepositoryUtil()
public AttachmentManager getAttachmentManager()
public VersionManager getVersionManager()
public BulkOperationManager getBulkOperationManager()
public MoveSubTaskOperationManager getMoveSubTaskOperationManager()
public static ComponentManager getInstance()
public static void stopTenant(com.atlassian.multitenant.Tenant tenant)
tenant
- that you are stoppingpublic static <T> T getComponentInstanceOfType(Class<T> clazz)
In practise, this is the same as getComponent(Class)
except it will try to find a unique component that
implements/extends the given Class even if the Class is not an actual component key.
Please note that this method only gets components from JIRA's core Pico Containter. That is, it retrieves
core components and components declared in Plugins1 plugins, but not components declared in Plugins2 plugins.
Plugins2 components can be retrieved via the getOSGiComponentInstanceOfType(Class)
method, but only if
they are public.
clazz
- class to find a component instance by
getOSGiComponentInstanceOfType(Class)
,
PicoContainer.getComponentInstanceOfType(Class)
public static <T> T getComponent(Class<T> clazz)
In practise, this is the same as getComponentInstanceOfType(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 Containter. That is, it retrieves
core components and components declared in Plugins1 plugins, but not components declared in Plugins2 plugins.
Plugins2 components can be retrieved via the getOSGiComponentInstanceOfType(Class)
method, but only if
they are public.
clazz
- class to find a component instance by
getOSGiComponentInstanceOfType(Class)
,
PicoContainer.getComponentInstance(Object)
public static <T> T getOSGiComponentInstanceOfType(Class<T> clazz)
It is important to note that this only works for public components. That is components with public="true"
declared in their XML configuration. This means that they are available for other plugins to
import.
A use case for this is when for example for the dashboards plugin. In several areas in JIRA we may want to
render gadgets via the 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.
clazz
- class to find an OSGi component instance for
getComponentInstanceOfType(Class)
public static <T> List<T> getComponentsOfType(Class<T> clazz)
clazz
- the class to search for.
public static <T> Map<String,T> getComponentsOfTypeMap(Class<T> iface)
iface
- The class to search for
public IssueUpdater getIssueUpdater()
public IssueCreationHelperBean getIssueCreationHelperBean()
public FileIconBean getFileIconBean()
public IssueManager getIssueManager()
public WorkflowManager getWorkflowManager()
public WorklogManager getWorklogManager()
public IssueFactory getIssueFactory()
Issue
from
public ProjectFactory getProjectFactory()
public ConstantsManager getConstantsManager()
public FieldManager getFieldManager()
ComponentAccessor.getFieldManager()
instead. Since v4.4.
public CustomFieldManager getCustomFieldManager()
public IssueTypeSchemeManager getIssueTypeSchemeManager()
public IssueTypeScreenSchemeManager getIssueTypeScreenSchemeManager()
ComponentAccessor.getIssueTypeScreenSchemeManager()
instead. Since v5.0.
public SubTaskManager getSubTaskManager()
public IssueLinkManager getIssueLinkManager()
public ApplicationProperties getApplicationProperties()
public com.atlassian.crowd.embedded.api.CrowdService getCrowdService()
public PermissionManager getPermissionManager()
public PermissionTypeManager getPermissionTypeManager()
public FieldLayoutManager getFieldLayoutManager()
public ColumnLayoutManager getColumnLayoutManager()
public ProjectManager getProjectManager()
public VoteManager getVoteManager()
public JiraLocaleUtils getJiraLocaleUtils()
public com.atlassian.plugin.PluginSystemLifecycle getPluginSystemLifecycle()
public com.atlassian.plugin.PluginAccessor getPluginAccessor()
public com.atlassian.plugin.event.PluginEventManager getPluginEventManager()
public ComponentClassManager getComponentClassManager()
ComponentAccessor.getComponentClassManager()
instead. Since v5.0.
public com.atlassian.plugin.PluginController getPluginController()
public UpgradeManager getUpgradeManager()
public RendererManager getRendererManager()
public FieldScreenRendererFactory getFieldScreenRendererFactory()
public WorkflowSchemeManager getWorkflowSchemeManager()
public IndexLifecycleManager getIndexLifecycleManager()
public IssueIndexManager getIndexManager()
public IssueService getIssueService()
public IndexPathManager getIndexPathManager()
public AttachmentPathManager getAttachmentPathManager()
public TranslationManager getTranslationManager()
public JiraAuthenticationContext getJiraAuthenticationContext()
public WatcherManager getWatcherManager()
public SearchService getSearchService()
public SearchProvider getSearchProvider()
@Deprecated public SearchRequestManager getSearchRequestManager()
SearchRequestService
public SearchRequestService getSearchRequestService()
public SearchRequestAdminService getSearchRequestAdminService()
public SearchRequestFactory getSearchRequestFactory()
SearchRequestFactory
public FieldScreenManager getFieldScreenManager()
public FieldScreenSchemeManager getFieldScreenSchemeManager()
public SchemePermissions getSchemePermissions()
public com.atlassian.mail.server.MailServerManager getMailServerManager()
public EventTypeManager getEventTypeManager()
public TemplateManager getTemplateManager()
public UserUtil getUserUtil()
public AssigneeResolver getAssigneeResolver()
public MailingListCompiler getMailingListCompiler()
public SubscriptionMailQueueItemFactory getSubscriptionMailQueueItemFactory()
public com.atlassian.velocity.VelocityManager getVelocityManager()
public CommentManager getCommentManager()
public void refreshUpgradeManager()
public ProjectComponentManager getProjectComponentManager()
public ChangeHistoryManager getChangeHistoryManager()
ChangeHistoryManager
manager instance
public PermissionContextFactory getPermissionContextFactory()
public UserPreferencesManager getUserPreferencesManager()
public UserPropertyManager getUserPropertyManager()
public JiraDurationUtils getJiraDurationUtils()
public TaskManager getTaskManager()
TaskManager
TaskManager
public com.atlassian.security.auth.trustedapps.TrustedApplicationsManager getTrustedApplicationsManager()
public OutlookDateManager getOutlookDateManager()
public PortalPageService getPortalPageService()
PortalPageService
public PortalPageManager getPortalPageManager()
PortalPageManager
public AvatarManager getAvatarManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |