|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.search.searchers.transformer.IdIndexedSearchInputTransformer<T>
@NonInjectableComponent public abstract class IdIndexedSearchInputTransformer<T>
A SearchInputTransformer that handles any field that is represented by its id in the Lucene document, and hence is represented by a select list in the Issue Navigator. May or may not also have flag functions.
Field Summary | |
---|---|
protected FieldFlagOperandRegistry |
fieldFlagOperandRegistry
|
protected IndexInfoResolver<T> |
indexInfoResolver
|
protected JqlOperandResolver |
operandResolver
|
protected SearchContextVisibilityChecker |
searchContextVisibilityChecker
|
Constructor Summary | |
---|---|
IdIndexedSearchInputTransformer(ClauseNames id,
IndexInfoResolver<T> indexInfoResolver,
JqlOperandResolver operandResolver,
FieldFlagOperandRegistry fieldFlagOperandRegistry,
SearchContextVisibilityChecker searchContextVisibilityChecker)
|
|
IdIndexedSearchInputTransformer(ClauseNames clauseNames,
String urlParameterName,
IndexInfoResolver<T> indexInfoResolver,
JqlOperandResolver operandResolver,
FieldFlagOperandRegistry fieldFlagOperandRegistry,
SearchContextVisibilityChecker searchContextVisibilityChecker)
|
Method Summary | |
---|---|
boolean |
doRelevantClausesFitFilterForm(com.atlassian.crowd.embedded.api.User searcher,
Query query,
SearchContext searchContext)
Tells the caller whether or not the relevant clauses from the passed query can be represented on the issue navigator. |
protected DefaultIndexedInputHelper |
getDefaultIndexedInputHelper()
|
protected IndexedInputHelper |
getIndexedInputHelper()
|
Clause |
getSearchClause(com.atlassian.crowd.embedded.api.User searcher,
FieldValuesHolder fieldValuesHolder)
For this implementation we expect that the fieldValuesHolder will contain a list of strings or nothing at all, if not then this will throw an exception. |
void |
populateFromParams(com.atlassian.crowd.embedded.api.User searcher,
FieldValuesHolder fieldValuesHolder,
ActionParams actionParams)
Populate FieldValuesHolder object with whatever values the searcher is interested in from the
ActionParams . |
void |
populateFromQuery(com.atlassian.crowd.embedded.api.User searcher,
FieldValuesHolder fieldValuesHolder,
Query query,
SearchContext searchContext)
This method transforms any query information contained in the query that is relevant to this SearchInputTransformer into the values that the HTML rendering expects. |
void |
validateParams(com.atlassian.crowd.embedded.api.User searcher,
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final FieldFlagOperandRegistry fieldFlagOperandRegistry
protected final JqlOperandResolver operandResolver
protected final IndexInfoResolver<T> indexInfoResolver
protected final SearchContextVisibilityChecker searchContextVisibilityChecker
Constructor Detail |
---|
public IdIndexedSearchInputTransformer(ClauseNames id, IndexInfoResolver<T> indexInfoResolver, JqlOperandResolver operandResolver, FieldFlagOperandRegistry fieldFlagOperandRegistry, SearchContextVisibilityChecker searchContextVisibilityChecker)
public IdIndexedSearchInputTransformer(ClauseNames clauseNames, String urlParameterName, IndexInfoResolver<T> indexInfoResolver, JqlOperandResolver operandResolver, FieldFlagOperandRegistry fieldFlagOperandRegistry, SearchContextVisibilityChecker searchContextVisibilityChecker)
Method Detail |
---|
public void populateFromParams(com.atlassian.crowd.embedded.api.User searcher, FieldValuesHolder fieldValuesHolder, ActionParams actionParams)
SearchInputTransformer
FieldValuesHolder
object with whatever values the searcher is interested in from the
ActionParams
. This transforms the "raw" request parameters
into a form that the other processing methods can handle (usually a mapping of the fields name as the key
and a list of the values as the value).
populateFromParams
in interface SearchInputTransformer
searcher
- performing this action.fieldValuesHolder
- is the object that should have its values set by this method and that will contain
any other values that have been set by other SearchInputTransformers.actionParams
- params from the webwork front end that contains a String[] of values as submitted via thepublic void validateParams(com.atlassian.crowd.embedded.api.User searcher, SearchContext searchContext, FieldValuesHolder fieldValuesHolder, I18nHelper i18nHelper, ErrorCollection errors)
SearchInputTransformer
validateParams
in interface SearchInputTransformer
searcher
- performing this action.searchContext
- the context of the search (i.e. projects and issue types selected).fieldValuesHolder
- contains values populated by the populate methods of this input transformer.i18nHelper
- used to internationalize error messages that we want to display to the users.errors
- the ErrorCollection that contains the messages we want to display to the users.public void populateFromQuery(com.atlassian.crowd.embedded.api.User searcher, FieldValuesHolder fieldValuesHolder, Query query, SearchContext searchContext)
SearchInputTransformer
FieldValuesHolder
from the a query information in the
query.
SearchInputTransformer.getSearchClause(User, com.atlassian.jira.issue.transport.FieldValuesHolder)
method.
populateFromQuery
in interface SearchInputTransformer
searcher
- performing this action.fieldValuesHolder
- is the object that should have its values set by this method and that will contain
any other values that have been set by other SearchInputTransformers.query
- the search criteria used to populate the field values holder.searchContext
- contains the projects and issue types that the search and filter form is restricted topublic boolean doRelevantClausesFitFilterForm(com.atlassian.crowd.embedded.api.User searcher, Query query, SearchContext searchContext)
SearchInputTransformer
doRelevantClausesFitFilterForm
in interface SearchInputTransformer
searcher
- performing this action.query
- to check if it can fit in the simple (GUI form based) issue navigator.searchContext
- contains the projects and issue types that the search and filter form is restricted to
public Clause getSearchClause(com.atlassian.crowd.embedded.api.User searcher, FieldValuesHolder fieldValuesHolder)
getSearchClause
in interface SearchInputTransformer
searcher
- the user performing the searchfieldValuesHolder
- contains values populated by the searchers @return Clause that represents the raw values.
Clause
that represents the users search based on the fieldValuesHolder;
null if this searcher has no responsibility in the given input.
IllegalArgumentException
- if the value in the field values holder keyed by the
searcher id is not a list that contains strings.protected DefaultIndexedInputHelper getDefaultIndexedInputHelper()
DefaultIndexedInputHelper
alwaysprotected IndexedInputHelper getIndexedInputHelper()
IndexedInputHelper
which might be specialised for this particular searcher
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |