com.atlassian.jira.issue.search.searchers.impl
Class AbstractIssueSearcher

java.lang.Object
  extended bycom.atlassian.jira.issue.search.searchers.impl.AbstractIssueSearcher
All Implemented Interfaces:
Comparable, Field, IssueSearcher
Direct Known Subclasses:
AbstractUserSearcher, GenericConstantsSearcher, GenericDateSearcher, GenericProjectConstantsSearcher, QuerySearcher, SearchContextSearcher, WorkRatioSearcher

public abstract class AbstractIssueSearcher
extends Object
implements IssueSearcher


Field Summary
protected  JiraAuthenticationContext authenticationContext
           
protected static String EDIT_TEMPLATE_SUFFIX
           
protected  SearchableField field
           
protected static String VIEW_TEMPLATE_SUFFIX
           
 
Fields inherited from interface com.atlassian.jira.issue.search.searchers.IssueSearcher
I18N_BUNDLE, log
 
Constructor Summary
AbstractIssueSearcher(JiraAuthenticationContext authenticationContext)
           
 
Method Summary
 int compareTo(Object o)
          just compares the name
 boolean equals(Object o)
           
 String getEditHtml(SearchContext searchContext, FieldValuesHolder fieldValuesHolder, Map displayParameters, webwork.action.Action action)
           
protected  I18nHelper getI18n()
           
 String getName()
          Returns i18n'ed name of the field for system fields or the name of a custom field.
protected  Map getVelocityParams(SearchContext searchContext, FieldLayoutItem fieldLayoutItem, FieldValuesHolder fieldValuesHolder, Map displayParameters, webwork.action.Action action)
           
 String getViewHtml(SearchContext searchContext, FieldValuesHolder fieldValuesHolder, Map displayParameters, webwork.action.Action action)
           
 int hashCode()
           
 boolean hasPermission(String permissionName)
           
 void init(SearchableField field)
          Initialises the searcher with a given field.
 boolean isShown(SearchContext searchContext)
          Checks if the searcher should be shown in this context
 void register(SearcherRegistry registry)
          Registers the searcher in the registry.
protected  String renderEditTemplate(String template, Map velocityParams)
           
protected  String renderViewTemplate(String template, Map velocityParams)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.issue.search.searchers.IssueSearcher
getQuerySnippet, getRelatedIndexers, isRevelentForSeachRequest, populateFromParams, populateFromSearchRequest, populateSearchRequest, validateParams
 
Methods inherited from interface com.atlassian.jira.issue.fields.Field
getId, getNameKey
 

Field Detail

EDIT_TEMPLATE_SUFFIX

protected static final String EDIT_TEMPLATE_SUFFIX
See Also:
Constant Field Values

VIEW_TEMPLATE_SUFFIX

protected static final String VIEW_TEMPLATE_SUFFIX
See Also:
Constant Field Values

authenticationContext

protected final JiraAuthenticationContext authenticationContext

field

protected SearchableField field
Constructor Detail

AbstractIssueSearcher

public AbstractIssueSearcher(JiraAuthenticationContext authenticationContext)
Method Detail

getName

public String getName()
Description copied from interface: Field
Returns i18n'ed name of the field for system fields or the name of a custom field.

Specified by:
getName in interface Field

init

public void init(SearchableField field)
Description copied from interface: IssueSearcher
Initialises the searcher with a given field.

Specified by:
init in interface IssueSearcher
Parameters:
field - the field object. This may be null. (So you can have searchers on non-fields)

getEditHtml

public String getEditHtml(SearchContext searchContext,
                          FieldValuesHolder fieldValuesHolder,
                          Map displayParameters,
                          webwork.action.Action action)
Specified by:
getEditHtml in interface IssueSearcher

getViewHtml

public String getViewHtml(SearchContext searchContext,
                          FieldValuesHolder fieldValuesHolder,
                          Map displayParameters,
                          webwork.action.Action action)
Specified by:
getViewHtml in interface IssueSearcher

isShown

public boolean isShown(SearchContext searchContext)
Description copied from interface: IssueSearcher
Checks if the searcher should be shown in this context

Specified by:
isShown in interface IssueSearcher
Parameters:
searchContext - the context of the search (i.e. projects and issue types selected)
Returns:
true if the searcher will appear in the issue navigator

register

public void register(SearcherRegistry registry)
Description copied from interface: IssueSearcher
Registers the searcher in the registry. This enables the searcher to have customised behaviours for duplicate duplicate searchers. e.g. the Query searchers could register multiple fields to just one searcher instance, whereas other searchers would simply have multiple instances of the same field.

Specified by:
register in interface IssueSearcher
Parameters:
registry - The Searcher registry

getVelocityParams

protected Map getVelocityParams(SearchContext searchContext,
                                FieldLayoutItem fieldLayoutItem,
                                FieldValuesHolder fieldValuesHolder,
                                Map displayParameters,
                                webwork.action.Action action)

renderEditTemplate

protected String renderEditTemplate(String template,
                                    Map velocityParams)

renderViewTemplate

protected String renderViewTemplate(String template,
                                    Map velocityParams)

hasPermission

public boolean hasPermission(String permissionName)

compareTo

public int compareTo(Object o)
just compares the name

Specified by:
compareTo in interface Comparable

equals

public boolean equals(Object o)

hashCode

public int hashCode()

toString

public String toString()

getI18n

protected I18nHelper getI18n()


Copyright © 2002-2006 Atlassian. All Rights Reserved.