com.atlassian.jira.plugin.viewissue
Class PeopleBlockContextProvider
java.lang.Object
com.atlassian.jira.plugin.viewissue.PeopleBlockContextProvider
- All Implemented Interfaces:
- CacheableContextProvider, com.atlassian.plugin.web.ContextProvider
public class PeopleBlockContextProvider
- extends Object
- implements CacheableContextProvider
Context Provider for the People Block pnn view issue
- Since:
- v4.4
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PeopleBlockContextProvider
public PeopleBlockContextProvider(ApplicationProperties applicationProperties,
PermissionManager permissionManager,
JiraAuthenticationContext authenticationContext,
WatcherManager watcherManager,
UserFormatManager userFormatManager,
FieldVisibilityManager fieldVisibilityManager,
FieldScreenRendererFactory fieldScreenRendererFactory,
VoteManager voteManager)
init
public void init(Map<String,String> params)
throws com.atlassian.plugin.PluginParseException
- Specified by:
init
in interface com.atlassian.plugin.web.ContextProvider
- Throws:
com.atlassian.plugin.PluginParseException
getContextMap
public Map<String,Object> getContextMap(Map<String,Object> context)
- Specified by:
getContextMap
in interface com.atlassian.plugin.web.ContextProvider
getUniqueContextKey
public String getUniqueContextKey(Map<String,Object> context)
- Description copied from interface:
CacheableContextProvider
- Return a key that is unique for the scope that this context should be scoped. E.g. If the context is unique per
issue, per user return "JRA-11234:nmenere"
- Specified by:
getUniqueContextKey
in interface CacheableContextProvider
- Parameters:
context
- the context passed into the getContextMap method.
- Returns:
- a key that is unique for the scope that this context
getAssigneeDisplayHtml
public String getAssigneeDisplayHtml(Issue issue)
- Returns a HTML displayable string of the issues assignee.
if the issue:
- is null, returns an empty string.
- has an assignee username but no user with that username, returns just the username
- has a valid assignee, returns the full name of the assignee wrapped in HTML link to the users profile
- has no assignee, returns i18n of 'common.status.unassigned' key
- Parameters:
issue
- issue to get the assignee from
- Returns:
- HTML displayable string of the issues assignee
getReporterDisplayHtml
public String getReporterDisplayHtml(Issue issue)
- Returns a HTML displayable string of the issues reporter.
if the issue:
- is null, returns an empty string.
- has an reporter username but no user with that username, returns just the username
- has a valid reporter, returns the full name of the reporter wrapped in HTML link to the users profile
- has no reporter, returns i18n of 'common.status.unassigned' key
- Parameters:
issue
- issue to get the reporter from
- Returns:
- HTML displayable string of the issues reporter
Copyright © 2002-2012 Atlassian. All Rights Reserved.