public abstract class AbstractUserSearchRenderer extends AbstractSearchRenderer implements SearchRenderer
Modifier and Type | Field and Description |
---|---|
protected PermissionManager |
permissionManager |
static String |
SELECT_LIST_GROUP |
static String |
SELECT_LIST_NONE |
static String |
SELECT_LIST_USER |
protected UserSearcherHelper |
userSearcherHelper |
EDIT_TEMPLATE_SUFFIX, VIEW_TEMPLATE_SUFFIX
Constructor and Description |
---|
AbstractUserSearchRenderer(UserFieldSearchConstants searchConstants,
String nameKey,
VelocityRequestContextFactory velocityRequestContextFactory,
ApplicationProperties applicationProperties,
VelocityTemplatingEngine templatingEngine,
UserSearchService searchService,
UserManager userManager,
PermissionManager permissionManager) |
AbstractUserSearchRenderer(UserFieldSearchConstantsWithEmpty searchConstants,
String nameKey,
VelocityRequestContextFactory velocityRequestContextFactory,
ApplicationProperties applicationProperties,
VelocityTemplatingEngine templatingEngine,
UserSearchService searchService,
UserManager userManager,
PermissionManager permissionManager) |
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
addUserGroupSuggestionParams(FieldValuesHolder fieldValuesHolder,
ApplicationUser user,
SearchContext searchContext,
List<String> selectedUsers)
add user and group suggestions into parameters.
|
String |
getEditHtml(ApplicationUser user,
SearchContext searchContext,
FieldValuesHolder fieldValuesHolder,
Map displayParameters,
webwork.action.Action action)
Used to produce an HTML input that is rendered on the JIRA issue navigator.
|
protected abstract String |
getEmptyValueKey() |
protected abstract List<Map<String,String>> |
getSelectedListOptions(ApplicationUser searcher) |
protected String |
getTextForuser(ApplicationUser searcher,
FieldValuesHolder fieldValuesHolder) |
protected Map<String,Object> |
getVelocityParams(ApplicationUser searcher,
SearchContext searchContext,
FieldLayoutItem fieldLayoutItem,
FieldValuesHolder fieldValuesHolder,
Map displayParameters,
webwork.action.Action action) |
String |
getViewHtml(ApplicationUser user,
SearchContext searchContext,
FieldValuesHolder fieldValuesHolder,
Map displayParameters,
webwork.action.Action action)
Used to produce the HTML that displays a searchers summary information (e.g.
|
boolean |
isRelevantForQuery(ApplicationUser user,
Query query)
Checks if the searchRequest object has a search representation that was created by the searcher and is
used to determine if the
#getViewHtml(User, com.atlassian.jira.issue.search.SearchContext, com.atlassian.jira.issue.transport.FieldValuesHolder, java.util.Map, webwork.action.Action)
method should be called when rendering the search summary. |
getI18n, isRelevantForQuery, renderEditTemplate, renderViewTemplate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isShown
public static final String SELECT_LIST_NONE
public static final String SELECT_LIST_USER
public static final String SELECT_LIST_GROUP
protected final PermissionManager permissionManager
protected UserSearcherHelper userSearcherHelper
public AbstractUserSearchRenderer(UserFieldSearchConstantsWithEmpty searchConstants, String nameKey, VelocityRequestContextFactory velocityRequestContextFactory, ApplicationProperties applicationProperties, VelocityTemplatingEngine templatingEngine, UserSearchService searchService, UserManager userManager, PermissionManager permissionManager)
public AbstractUserSearchRenderer(UserFieldSearchConstants searchConstants, String nameKey, VelocityRequestContextFactory velocityRequestContextFactory, ApplicationProperties applicationProperties, VelocityTemplatingEngine templatingEngine, UserSearchService searchService, UserManager userManager, PermissionManager permissionManager)
public String getEditHtml(ApplicationUser user, SearchContext searchContext, FieldValuesHolder fieldValuesHolder, Map displayParameters, webwork.action.Action action)
SearchRenderer
SearchInputTransformer
that will know how to transform these input parameters into JIRA search objects.getEditHtml
in interface SearchRenderer
user
- performing this action.searchContext
- the search context of the current search request that may be participating in rendering the
issue navigator.fieldValuesHolder
- contains any request parameters that the HTML input may need to use to pre-populate
the input (e.g. if this is the priority renderer and the search request being rendered has two priorities already
selected these params will contain these request parameters). These parameters will have been populated via a
call to com.atlassian.jira.issue.search.searchers.transformer.SearchInputTransformer#populateFromQuery(User, com.atlassian.jira.issue.transport.FieldValuesHolder, com.atlassian.query.Query, com.atlassian.jira.issue.search.SearchContext)
if there is a SearchRequest involved in the rendering this IssueNavigator call.displayParameters
- are a map of "hints" that can be passed from the caller to this code which can use these
hints to alter the way it renders the HTML.action
- is the WebWork 1 action object that is rendering the Issue Navigator view. This can be used to
invoke methods on the view.public String getViewHtml(ApplicationUser user, SearchContext searchContext, FieldValuesHolder fieldValuesHolder, Map displayParameters, webwork.action.Action action)
SearchRenderer
getViewHtml
in interface SearchRenderer
user
- performing this action.searchContext
- the search context of the current search request that may be participating in rendering the
issue navigator.fieldValuesHolder
- contains any request parameters that the HTML input may need to use to pre-populate
the input (e.g. if this is the priority renderer and the search request being rendered has two priorities already
selected these params will contain these request parameters). These parameters will have been populated via a
call to com.atlassian.jira.issue.search.searchers.transformer.SearchInputTransformer#populateFromQuery(User, com.atlassian.jira.issue.transport.FieldValuesHolder, com.atlassian.query.Query, com.atlassian.jira.issue.search.SearchContext)
if there is a SearchRequest involved in the rendering this IssueNavigator call.displayParameters
- are a map of "hints" that can be passed from the caller to this code which can use these
hints to alter the way it renders the HTML.action
- is the WebWork 1 action object that is rendering the Issue Navigator view. This can be used to
invoke methods on the view.public boolean isRelevantForQuery(ApplicationUser user, Query query)
SearchRenderer
#getViewHtml(User, com.atlassian.jira.issue.search.SearchContext, com.atlassian.jira.issue.transport.FieldValuesHolder, java.util.Map, webwork.action.Action)
method should be called when rendering the search summary.isRelevantForQuery
in interface SearchRenderer
user
- performing this action.query
- contains the search criteria used to determine if this query is relevevant to the searcher.protected abstract List<Map<String,String>> getSelectedListOptions(ApplicationUser searcher)
searcher
- performing the action.protected abstract String getEmptyValueKey()
protected String getTextForuser(ApplicationUser searcher, FieldValuesHolder fieldValuesHolder)
protected Map<String,Object> getVelocityParams(ApplicationUser searcher, SearchContext searchContext, FieldLayoutItem fieldLayoutItem, FieldValuesHolder fieldValuesHolder, Map displayParameters, webwork.action.Action action)
getVelocityParams
in class AbstractSearchRenderer
protected Map<String,Object> addUserGroupSuggestionParams(FieldValuesHolder fieldValuesHolder, ApplicationUser user, SearchContext searchContext, List<String> selectedUsers)
default implementation returns recently selected users and the first few users from the system, if not enough recently selected users, and returns the groups the user is in, or first few groups in the system, if the user is not specified.
fieldValuesHolder
- user
- searchContext
- selectedUsers
- recently selected usersCopyright © 2002-2022 Atlassian. All Rights Reserved.