Class AbstractProjectConstantsRenderer<I extends SearchInput,O extends com.atlassian.jira.issue.search.searchers.renderer.Options>
java.lang.Object
com.atlassian.jira.issue.search.searchers.renderer.AbstractSearchRenderer
com.atlassian.jira.issue.search.searchers.renderer.AbstractProjectConstantsRenderer<I,O>
- All Implemented Interfaces:
SearchRenderer
- Direct Known Subclasses:
AbstractVersionRenderer,ComponentSearchRenderer
public abstract class AbstractProjectConstantsRenderer<I extends SearchInput,O extends com.atlassian.jira.issue.search.searchers.renderer.Options>
extends AbstractSearchRenderer
implements SearchRenderer
An abstract renderer for the project constants (versions and components).
- Since:
- v4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA label with an optional url to the browse page -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ProjectManagerprotected final SimpleFieldSearchConstantsWithEmptyFields inherited from class com.atlassian.jira.issue.search.searchers.renderer.AbstractSearchRenderer
EDIT_TEMPLATE_SUFFIX, VIEW_TEMPLATE_SUFFIX -
Method Summary
Modifier and TypeMethodDescriptionprotected voidenableRestApiMode(Map<String, Object> velocityParameters, Map<?, ?> displayParameters) 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.getVelocityParams(ApplicationUser user, SearchContext searchContext, FieldLayoutItem fieldLayoutItem, FieldValuesHolder fieldValuesHolder, Map<?, ?> displayParameters, webwork.action.Action action) 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.booleanisRelevantForQuery(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 themethod should be called when rendering the search summary.invalid reference
#getViewHtml(User, com.atlassian.jira.issue.search.SearchContext, com.atlassian.jira.issue.transport.FieldValuesHolder, java.util.Map, webwork.action.Action)booleanisShown(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.protected List<GroupTextOption> limitGroupChildOptionsExcludingSelected(Collection<GroupTextOption> groups, int limit, SelectedValues selectedValues) Return a list constructed by taking groups until their total child options count hits the limit.Methods inherited from class com.atlassian.jira.issue.search.searchers.renderer.AbstractSearchRenderer
getI18n, isRelevantForQuery, renderEditTemplate, renderViewTemplate
-
Field Details
-
projectManager
-
searchConstants
-
-
Method Details
-
isRelevantForQuery
Description copied from interface:SearchRendererChecks if the searchRequest object has a search representation that was created by the searcher and is used to determine if themethod should be called when rendering the search summary.invalid reference
#getViewHtml(User, com.atlassian.jira.issue.search.SearchContext, com.atlassian.jira.issue.transport.FieldValuesHolder, java.util.Map, webwork.action.Action)- Specified by:
isRelevantForQueryin interfaceSearchRenderer- Parameters:
user- performing this action.query- contains the search criteria used to determine if this query is relevevant to the searcher.- Returns:
- true if the query has relevant clauses to the searchers, false otherwise.
-
isShown
Description copied from interface:SearchRendererChecks if the searcher should be shown in this context on the Issue Navigator.- Specified by:
isShownin interfaceSearchRenderer- Parameters:
user- performing this action.searchContext- the context of the search (i.e. projects and issue types selected).- Returns:
- true if the searcher will appear in the issue navigator, false otherwise.
-
getEditHtml
public String getEditHtml(ApplicationUser user, SearchContext searchContext, FieldValuesHolder fieldValuesHolder, Map<?, ?> displayParameters, webwork.action.Action action) Description copied from interface:SearchRendererUsed to produce an HTML input that is rendered on the JIRA issue navigator. This HTML provides the UI for searching a fields content. There will be a correspondingSearchInputTransformerthat will know how to transform these input parameters into JIRA search objects.- Specified by:
getEditHtmlin interfaceSearchRenderer- Parameters:
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 toif there is a SearchRequest involved in the rendering this IssueNavigator call.invalid reference
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)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.- Returns:
- a String that contains HTML that can be rendered on the left-hand side of the JIRA issue navigator.
-
enableRestApiMode
-
getViewHtml
public String getViewHtml(ApplicationUser user, SearchContext searchContext, FieldValuesHolder fieldValuesHolder, Map<?, ?> displayParameters, webwork.action.Action action) Description copied from interface:SearchRendererUsed to produce the HTML that displays a searchers summary information (e.g. if this is the priority searcher and a user has selected two priorities then this method will render HTML that shows something like 'priority: Major, Minor').- Specified by:
getViewHtmlin interfaceSearchRenderer- Parameters:
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 toif there is a SearchRequest involved in the rendering this IssueNavigator call.invalid reference
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)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.- Returns:
- a String that contains HTML that can be rendered on the left-hand side of the issue navigator to show a SearchRequest summary.
-
getVelocityParams
protected Map<String,Object> getVelocityParams(ApplicationUser user, SearchContext searchContext, FieldLayoutItem fieldLayoutItem, FieldValuesHolder fieldValuesHolder, Map<?, ?> displayParameters, webwork.action.Action action) - Overrides:
getVelocityParamsin classAbstractSearchRenderer
-
limitGroupChildOptionsExcludingSelected
protected List<GroupTextOption> limitGroupChildOptionsExcludingSelected(@Nonnull Collection<GroupTextOption> groups, int limit, SelectedValues selectedValues) Return a list constructed by taking groups until their total child options count hits the limit. The last group could have its number of the child options reduced to fit in the given limit. The method does not account selected options in the limit. The method does not modify given collection. -
limitGroupChildOptions
protected List<GroupTextOption> limitGroupChildOptions(@Nonnull Collection<GroupTextOption> groups, int limit) Return a list constructed by taking groups until their total child options count hits the limit. The last group could have its number of the child options reduced to fit in the given limit. The method does not modify given collection.
-