com.atlassian.jira.issue.search.searchers.impl
Class AbstractIssueSearcher
java.lang.Object
com.atlassian.jira.issue.search.searchers.impl.AbstractIssueSearcher
- All Implemented Interfaces:
- Field, IssueSearcher, Comparable
- Direct Known Subclasses:
- AbstractUserSearcher, GenericConstantsSearcher, GenericDateSearcher, GenericProjectConstantsSearcher, QuerySearcher, SearchContextSearcher, WorkRatioSearcher
public abstract class AbstractIssueSearcher
- extends Object
- implements IssueSearcher
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()
|
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
AbstractIssueSearcher
public AbstractIssueSearcher(JiraAuthenticationContext authenticationContext)
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)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
getI18n
protected I18nHelper getI18n()
Copyright © 2002-2007 Atlassian. All Rights Reserved.