public abstract class AbstractProjectConstantsRenderer<I extends SearchInput,O extends com.atlassian.jira.issue.search.searchers.renderer.Options> extends AbstractSearchRenderer implements SearchRenderer
Modifier and Type | Class and Description |
---|---|
static class |
AbstractProjectConstantsRenderer.GenericProjectConstantsLabel
A label with an optional url to the browse page
|
Modifier and Type | Field and Description |
---|---|
protected ProjectManager |
projectManager |
protected SimpleFieldSearchConstantsWithEmpty |
searchConstants |
EDIT_TEMPLATE_SUFFIX, VIEW_TEMPLATE_SUFFIX
Modifier and Type | Method and Description |
---|---|
protected void |
enableRestApiMode(Map<String,Object> velocityParameters,
Map<?,?> displayParameters) |
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 Map<String,Object> |
getVelocityParams(ApplicationUser user,
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. |
boolean |
isShown(ApplicationUser user,
SearchContext searchContext)
Checks if the searcher should be shown in this context on the Issue Navigator.
|
protected List<GroupTextOption> |
limitGroupChildOptions(Collection<GroupTextOption> groups,
int limit)
Return a list constructed by taking groups until their total child options count hits the limit.
|
getI18n, isRelevantForQuery, renderEditTemplate, renderViewTemplate
protected final ProjectManager projectManager
protected final SimpleFieldSearchConstantsWithEmpty searchConstants
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.public boolean isShown(ApplicationUser user, SearchContext searchContext)
SearchRenderer
isShown
in interface SearchRenderer
user
- performing this action.searchContext
- the context of the search (i.e. projects and issue types selected).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.protected void enableRestApiMode(@Nonnull Map<String,Object> velocityParameters, @Nonnull Map<?,?> displayParameters)
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.protected Map<String,Object> getVelocityParams(ApplicationUser user, SearchContext searchContext, FieldLayoutItem fieldLayoutItem, FieldValuesHolder fieldValuesHolder, Map<?,?> displayParameters, webwork.action.Action action)
getVelocityParams
in class AbstractSearchRenderer
protected List<GroupTextOption> limitGroupChildOptions(@Nonnull Collection<GroupTextOption> groups, int limit)
Copyright © 2002-2023 Atlassian. All Rights Reserved.