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

java.lang.Object
  extended by com.atlassian.jira.issue.search.searchers.impl.AbstractIssueSearcher
      extended by com.atlassian.jira.issue.search.searchers.impl.WorkRatioSearcher
All Implemented Interfaces:
Field, IssueSearcher, Comparable

public class WorkRatioSearcher
extends AbstractIssueSearcher


Field Summary
protected  ApplicationProperties applicationProperties
           
protected  FieldVisibilityBean fieldVisibilityBean
           
static String MAX_FIELD
           
static String MAX_LIMIT_SUFFIX
           
static String MIN_FIELD
           
static String MIN_LIMIT_SUFFIX
           
static String WORK_RATIO_ID
           
 
Fields inherited from class com.atlassian.jira.issue.search.searchers.impl.AbstractIssueSearcher
authenticationContext, EDIT_TEMPLATE_SUFFIX, field, VIEW_TEMPLATE_SUFFIX
 
Fields inherited from interface com.atlassian.jira.issue.search.searchers.IssueSearcher
I18N_BUNDLE, log
 
Constructor Summary
WorkRatioSearcher(JiraAuthenticationContext authenticationContext, FieldVisibilityBean fieldVisibilityBean, ApplicationProperties applicationProperties)
           
 
Method Summary
 String getId()
          The unique id of the field
 String getMaxField()
           
 String getMinField()
           
 String getNameKey()
          The i18n key that is used to lookup the field's name when it is displayed
 String getQuerySnippet(SearchRequest searchRequest)
          Returns a JiraUrlCodec.encode(String) encoded string representing the relevent SearchParameter in the searchRequest.
 List getRelatedIndexers()
          Returns a list of FieldIndexer objects.
 boolean isRevelentForSeachRequest(SearchRequest searchRequest)
          Checks if the searchRequest object has SearchParameter objects that was created by the searcher
 boolean isShown(SearchContext searchContext)
          Checks if the searcher should be shown in this context
 void populateFromParams(FieldValuesHolder fieldValuesHolder, ActionParams actionParams)
          Populate FieldValuesHolder object with whatever values the searcher is interested in from the ActionParams
 void populateFromSearchRequest(FieldValuesHolder fieldValuesHolder, SearchRequest searchRequest)
          Populate FieldValuesHolder from the SearchRequest object.
 void populateSearchRequest(SearchRequest searchRequest, FieldValuesHolder fieldValuesHolder)
          Populate the SearchRequest with SearchParameter objects from the FieldValuesHolder
 void validateParams(SearchContext searchContext, FieldValuesHolder fieldValuesHolder, I18nHelper i18nHelper, ErrorCollection errors)
          Adds error meessages to the errors object if values in the fieldValuesHolder fails validation.
 
Methods inherited from class com.atlassian.jira.issue.search.searchers.impl.AbstractIssueSearcher
compareTo, equals, getEditHtml, getI18n, getName, getVelocityParams, getViewHtml, hashCode, hasPermission, init, register, renderEditTemplate, renderViewTemplate, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

MIN_LIMIT_SUFFIX

public static final String MIN_LIMIT_SUFFIX
See Also:
Constant Field Values

MAX_LIMIT_SUFFIX

public static final String MAX_LIMIT_SUFFIX
See Also:
Constant Field Values

WORK_RATIO_ID

public static final String WORK_RATIO_ID
See Also:
Constant Field Values

MAX_FIELD

public static final String MAX_FIELD
See Also:
Constant Field Values

MIN_FIELD

public static final String MIN_FIELD
See Also:
Constant Field Values

fieldVisibilityBean

protected final FieldVisibilityBean fieldVisibilityBean

applicationProperties

protected final ApplicationProperties applicationProperties
Constructor Detail

WorkRatioSearcher

public WorkRatioSearcher(JiraAuthenticationContext authenticationContext,
                         FieldVisibilityBean fieldVisibilityBean,
                         ApplicationProperties applicationProperties)
Method Detail

getRelatedIndexers

public List getRelatedIndexers()
Description copied from interface: IssueSearcher
Returns a list of FieldIndexer objects. The objects should be initialised and ready for action

Returns:
List of FieldIndexer objects. Must not be null. Return Collections.EMPTY_LIST if not available

validateParams

public void validateParams(SearchContext searchContext,
                           FieldValuesHolder fieldValuesHolder,
                           I18nHelper i18nHelper,
                           ErrorCollection errors)
Description copied from interface: IssueSearcher
Adds error meessages to the errors object if values in the fieldValuesHolder fails validation.

Parameters:
searchContext - the context of the search (i.e. projects and issue types selected)
fieldValuesHolder - contains values populated by the searchers

populateFromParams

public void populateFromParams(FieldValuesHolder fieldValuesHolder,
                               ActionParams actionParams)
Description copied from interface: IssueSearcher
Populate FieldValuesHolder object with whatever values the searcher is interested in from the ActionParams

Parameters:
fieldValuesHolder - contains values populated by the searchers
actionParams - params from the webwork front end

populateFromSearchRequest

public void populateFromSearchRequest(FieldValuesHolder fieldValuesHolder,
                                      SearchRequest searchRequest)
Description copied from interface: IssueSearcher
Populate FieldValuesHolder from the SearchRequest object. Which SearchParameter really to take from the SR should match with the method IssueSearcher.populateSearchRequest(SearchRequest, FieldValuesHolder)

Parameters:
fieldValuesHolder - contains values populated by the searchers
searchRequest - relevent search request
See Also:
IssueSearcher.populateSearchRequest(SearchRequest, FieldValuesHolder)

populateSearchRequest

public void populateSearchRequest(SearchRequest searchRequest,
                                  FieldValuesHolder fieldValuesHolder)
Description copied from interface: IssueSearcher
Populate the SearchRequest with SearchParameter objects from the FieldValuesHolder

Parameters:
searchRequest - relevent search request
fieldValuesHolder - contains values populated by the searchers

isRevelentForSeachRequest

public boolean isRevelentForSeachRequest(SearchRequest searchRequest)
Description copied from interface: IssueSearcher
Checks if the searchRequest object has SearchParameter objects that was created by the searcher

Parameters:
searchRequest - relevent search request
Returns:
true if the searchRequest has relevent parameters to the searchers

getId

public String getId()
Description copied from interface: Field
The unique id of the field


getNameKey

public String getNameKey()
Description copied from interface: Field
The i18n key that is used to lookup the field's name when it is displayed


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
Overrides:
isShown in class AbstractIssueSearcher
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

getQuerySnippet

public String getQuerySnippet(SearchRequest searchRequest)
Description copied from interface: IssueSearcher
Returns a JiraUrlCodec.encode(String) encoded string representing the relevent SearchParameter in the searchRequest. The queryString should be able to be converted back to the original SearchRequest. i.e. getQuerySnippet -> String -> populateFromParams -> FieldValuesHolder -> populateSearchRequest -> SearchRequest -> getQuerySnippet should return the same original string.

Parameters:
searchRequest - relevent search request
Returns:
JiraUrlCodec.encode(String) encoded string representing the relevent SearchParameter in the searchRequest

getMaxField

public String getMaxField()

getMinField

public String getMinField()


Copyright © 2002-2007 Atlassian. All Rights Reserved.