com.atlassian.jira.issue.search.searchers.renderer
Class AbstractProjectConstantsRenderer

java.lang.Object
  extended by com.atlassian.jira.issue.search.searchers.renderer.AbstractSearchRenderer
      extended by com.atlassian.jira.issue.search.searchers.renderer.AbstractProjectConstantsRenderer
All Implemented Interfaces:
SearchRenderer
Direct Known Subclasses:
AffectedVersionRenderer, ComponentSearchRenderer, FixForVersionRenderer

public abstract class AbstractProjectConstantsRenderer
extends AbstractSearchRenderer
implements SearchRenderer

An abstract renderer for the project constants (versions and components).

Since:
v4.0

Nested Class Summary
static class AbstractProjectConstantsRenderer.GenericProjectConstantsLabel
          A label with an optional url to the browse page
 
Field Summary
 
Fields inherited from class com.atlassian.jira.issue.search.searchers.renderer.AbstractSearchRenderer
EDIT_TEMPLATE_SUFFIX, VIEW_TEMPLATE_SUFFIX
 
Constructor Summary
AbstractProjectConstantsRenderer(VelocityRequestContextFactory velocityRequestContextFactory, ApplicationProperties applicationProperties, com.atlassian.velocity.VelocityManager velocityManager, FieldVisibilityManager fieldVisibilityManager, SimpleFieldSearchConstantsWithEmpty searchConstants, String searcherNameKey)
           
 
Method Summary
 boolean isRelevantForQuery(User searcher, Query query)
          Checks if the searchRequest object has a search representation that was created by the searcher and is used to determine if the 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.
 boolean isShown(User searcher, SearchContext searchContext)
          Checks if the searcher should be shown in this context on the Issue Navigator.
 
Methods inherited from class com.atlassian.jira.issue.search.searchers.renderer.AbstractSearchRenderer
getI18n, getVelocityParams, isRelevantForQuery, renderEditTemplate, renderViewTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.issue.search.searchers.renderer.SearchRenderer
getEditHtml, getViewHtml
 

Constructor Detail

AbstractProjectConstantsRenderer

public AbstractProjectConstantsRenderer(VelocityRequestContextFactory velocityRequestContextFactory,
                                        ApplicationProperties applicationProperties,
                                        com.atlassian.velocity.VelocityManager velocityManager,
                                        FieldVisibilityManager fieldVisibilityManager,
                                        SimpleFieldSearchConstantsWithEmpty searchConstants,
                                        String searcherNameKey)
Method Detail

isRelevantForQuery

public boolean isRelevantForQuery(User searcher,
                                  Query query)
Description copied from interface: SearchRenderer
Checks if the searchRequest object has a search representation that was created by the searcher and is used to determine if the 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.

Specified by:
isRelevantForQuery in interface SearchRenderer
Parameters:
searcher - 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

public boolean isShown(User searcher,
                       SearchContext searchContext)
Description copied from interface: SearchRenderer
Checks if the searcher should be shown in this context on the Issue Navigator.

Specified by:
isShown in interface SearchRenderer
Parameters:
searcher - 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.


Copyright © 2002-2011 Atlassian. All Rights Reserved.