public class

DefaultHostContextAccessor

extends Object
implements HostContextAccessor
java.lang.Object
   ↳ com.atlassian.jira.DefaultHostContextAccessor

Class Overview

This is necessary to provide a generic way for SAL to access a component that may not have been published the plugins 2.0 way.

Summary

Public Constructors
DefaultHostContextAccessor()
Public Methods
<T> T doInTransaction(HostTransactionCallback<T> hostTransactionCallback)
No transactions in JIRA so this is effectively a NoOp.
<T> Map<String, T> getComponentsOfType(Class<T> iface)
Returns a mapping of all the component keys to instances that are registered in pico for the given iface class.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.sal.spi.HostContextAccessor

Public Constructors

public DefaultHostContextAccessor ()

Public Methods

public T doInTransaction (HostTransactionCallback<T> hostTransactionCallback)

No transactions in JIRA so this is effectively a NoOp.

Parameters
hostTransactionCallback the action to be executed.
Returns
  • Result of the 'transaction'

public Map<String, T> getComponentsOfType (Class<T> iface)

Returns a mapping of all the component keys to instances that are registered in pico for the given iface class.

Parameters
iface The class that components returned need to implement.
Returns
  • A map of component key -> instance.