com.atlassian.jira.issue.search.searchers.transformer
Class UserSearchInputTransformer

java.lang.Object
  extended by com.atlassian.jira.issue.search.searchers.transformer.UserSearchInputTransformer
All Implemented Interfaces:
SearchInputTransformer
Direct Known Subclasses:
KickassUserSearchInputTransformer

public class UserSearchInputTransformer
extends Object
implements SearchInputTransformer

An search input transformer for issue type

Since:
v4.0

Field Summary
protected  String emptySelectFlag
           
protected  GroupManager groupManager
           
protected  UserFieldSearchConstants searchConstants
           
protected  UserFitsNavigatorHelper userFitsNavigatorHelper
           
protected  UserHistoryManager userHistoryManager
           
protected  UserManager userManager
           
 
Constructor Summary
protected UserSearchInputTransformer(GroupManager groupManager, UserManager userManager, String emptySelectFlag, UserFieldSearchConstants searchConstants, UserFitsNavigatorHelper userFitsNavigatorHelper, UserHistoryManager userHistoryManager, CustomField customField, CustomFieldInputHelper customFieldInputHelper)
           
  UserSearchInputTransformer(UserFieldSearchConstants searchConstants, UserFitsNavigatorHelper userFitsNavigatorHelper, GroupManager groupManager, UserManager userManager, UserHistoryManager userHistoryManager)
           
  UserSearchInputTransformer(UserFieldSearchConstants searchConstants, UserFitsNavigatorHelper userFitsNavigatorHelper, GroupManager groupManager, UserManager userManager, UserHistoryManager userHistoryManager, CustomField customField, CustomFieldInputHelper customFieldInputHelper)
           
  UserSearchInputTransformer(UserFieldSearchConstantsWithEmpty searchConstants, UserFitsNavigatorHelper userFitsNavigatorHelper, GroupManager groupManager, UserManager userManager, UserHistoryManager userHistoryManager)
           
 
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  String getClauseName(com.atlassian.crowd.embedded.api.User user)
           
protected  List<TerminalClause> getMatchingClauses(Set<String> jqlClauseNames, Query query)
           
 Clause getSearchClause(com.atlassian.crowd.embedded.api.User searcher, FieldValuesHolder fieldValuesHolder)
          Gets the portion of the Search Query that this searcher is responsible for.
 void populateFromParams(com.atlassian.crowd.embedded.api.User user, 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

userHistoryManager

protected final UserHistoryManager userHistoryManager

searchConstants

protected final UserFieldSearchConstants searchConstants

userFitsNavigatorHelper

protected final UserFitsNavigatorHelper userFitsNavigatorHelper

groupManager

protected final GroupManager groupManager

userManager

protected final UserManager userManager

emptySelectFlag

protected final String emptySelectFlag
Constructor Detail

UserSearchInputTransformer

public UserSearchInputTransformer(UserFieldSearchConstantsWithEmpty searchConstants,
                                  UserFitsNavigatorHelper userFitsNavigatorHelper,
                                  GroupManager groupManager,
                                  UserManager userManager,
                                  UserHistoryManager userHistoryManager)

UserSearchInputTransformer

public UserSearchInputTransformer(UserFieldSearchConstants searchConstants,
                                  UserFitsNavigatorHelper userFitsNavigatorHelper,
                                  GroupManager groupManager,
                                  UserManager userManager,
                                  UserHistoryManager userHistoryManager)

UserSearchInputTransformer

public UserSearchInputTransformer(UserFieldSearchConstants searchConstants,
                                  UserFitsNavigatorHelper userFitsNavigatorHelper,
                                  GroupManager groupManager,
                                  UserManager userManager,
                                  UserHistoryManager userHistoryManager,
                                  CustomField customField,
                                  CustomFieldInputHelper customFieldInputHelper)

UserSearchInputTransformer

protected UserSearchInputTransformer(GroupManager groupManager,
                                     UserManager userManager,
                                     String emptySelectFlag,
                                     UserFieldSearchConstants searchConstants,
                                     UserFitsNavigatorHelper userFitsNavigatorHelper,
                                     UserHistoryManager userHistoryManager,
                                     CustomField customField,
                                     CustomFieldInputHelper customFieldInputHelper)
Method Detail

populateFromParams

public void populateFromParams(com.atlassian.crowd.embedded.api.User user,
                               FieldValuesHolder fieldValuesHolder,
                               ActionParams actionParams)
Description copied from interface: SearchInputTransformer
Populate 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).

Specified by:
populateFromParams in interface SearchInputTransformer
Parameters:
user - 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 the

validateParams

public void validateParams(com.atlassian.crowd.embedded.api.User searcher,
                           SearchContext searchContext,
                           FieldValuesHolder fieldValuesHolder,
                           I18nHelper i18nHelper,
                           ErrorCollection errors)
Description copied from interface: SearchInputTransformer
Adds error meessages to the errors object if values in the fieldValuesHolder fails validation. This should be called once the fieldValuesHolder has been populated.

Specified by:
validateParams in interface SearchInputTransformer
Parameters:
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.

populateFromQuery

public void populateFromQuery(com.atlassian.crowd.embedded.api.User searcher,
                              FieldValuesHolder fieldValuesHolder,
                              Query query,
                              SearchContext searchContext)
Description copied from interface: SearchInputTransformer
This method transforms any query information contained in the query that is relevant to this SearchInputTransformer into the values that the HTML rendering expects. This should populate the FieldValuesHolder from the a query information in the query.
The query elements that are considered "relevant" to this method would be those that are produced by the SearchInputTransformer.getSearchClause(User, com.atlassian.jira.issue.transport.FieldValuesHolder) method.

Specified by:
populateFromQuery in interface SearchInputTransformer
Parameters:
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 to

doRelevantClausesFitFilterForm

public boolean doRelevantClausesFitFilterForm(com.atlassian.crowd.embedded.api.User searcher,
                                              Query query,
                                              SearchContext searchContext)
Description copied from interface: SearchInputTransformer
Tells the caller whether or not the relevant clauses from the passed query can be represented on the issue navigator. Implementors of this method needs to ensure that it can represent *ALL* related clauses on the navigator, and that the clauses' structure conforms to the simple navigator structure.

The method should only be concerned with the clauses related to this transformer. Other irrelevant clauses should be ignored.

Specified by:
doRelevantClausesFitFilterForm in interface SearchInputTransformer
Parameters:
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
Returns:
true if the query can be represented on navigator.

getSearchClause

public Clause getSearchClause(com.atlassian.crowd.embedded.api.User searcher,
                              FieldValuesHolder fieldValuesHolder)
Description copied from interface: SearchInputTransformer
Gets the portion of the Search Query that this searcher is responsible for.

Specified by:
getSearchClause in interface SearchInputTransformer
Parameters:
searcher - performing this action.
fieldValuesHolder - contains values populated by the searchers
Returns:
a Clause that represents the users search based on the fieldValuesHolder; null if this searcher has no responsibility in the given input.

getClauseName

protected String getClauseName(com.atlassian.crowd.embedded.api.User user)

getMatchingClauses

protected List<TerminalClause> getMatchingClauses(Set<String> jqlClauseNames,
                                                  Query query)


Copyright © 2002-2014 Atlassian. All Rights Reserved.