@PublicApi
public interface AttributeContext
A ColumnContext is associated with every issue data request and Structure export request. The context
contains some basic information, like the current user and JIRA base URL, and it can also contain other data
associated with the current request by Structure or other plug-ins. The current context is passed into every call
to IssueDataProvider,
IssueDataField,
ExportRendererProvider, and
ExportRenderer.
Please note that the context key space is shared by all plug-ins, so we advise you to use plugin-private keys (e.g. singleton objects or custom enums) to avoid conflicts.
ExportContextKeys,
ExportRequestContext,
ExportRenderContext| Modifier and Type | Method and Description |
|---|---|
String |
getBaseUrl() |
com.atlassian.jira.util.I18nHelper |
getI18nHelper() |
Locale |
getLocale() |
<T> T |
getObject(Object key)
Retrieve the value associated with a key.
|
com.atlassian.jira.user.ApplicationUser |
getUser() |
void |
putObject(Object key,
Object value)
Associate an arbitrary
value with the given request. |
@Nullable com.atlassian.jira.user.ApplicationUser getUser()
null if anonymous.@NotNull com.atlassian.jira.util.I18nHelper getI18nHelper()
I18nHelper instance for the current user.@NotNull String getBaseUrl()
void putObject(@NotNull
Object key,
@Nullable
Object value)
Associate an arbitrary value with the given request. The value can be retrieved by passing the same
key to getObject(Object).
Please note that ColumnContext instances are shared by all
issue data providers or
export renderer providers from
all plug-ins. Therefore we recommend you to use plugin-private keys (e.g. singleton objects or custom enums) to
avoid conflicts.
key - The key.value - The value. Pass null to clear the object associated with the given key.IllegalArgumentException - if key is read-only.@Nullable
<T> T getObject(@NotNull
Object key)
T - The expected type of the value.key - The key.key, or null if none.ClassCastException - if the value is not an instance of type <T>.Copyright © 2016 ALM Works. All Rights Reserved.