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

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

public class KickassUserSearchInputTransformer
extends UserSearchInputTransformer

A search input transformer for user/group fields with Kickass modifications.

Since:
v5.2

Field Summary
 
Fields inherited from class com.atlassian.jira.issue.search.searchers.transformer.UserSearchInputTransformer
emptySelectFlag, groupManager, searchConstants, userFitsNavigatorHelper, userHistoryManager, userManager
 
Constructor Summary
KickassUserSearchInputTransformer(UserFieldSearchConstants searchConstants, UserFitsNavigatorHelper userFitsNavigatorHelper, GroupManager groupManager, UserManager userManager, UserHistoryManager userHistoryManager)
           
KickassUserSearchInputTransformer(UserFieldSearchConstants searchConstants, UserFitsNavigatorHelper userFitsNavigatorHelper, GroupManager groupManager, UserManager userManager, UserHistoryManager userHistoryManager, CustomField customField, CustomFieldInputHelper customFieldInputHelper)
           
KickassUserSearchInputTransformer(UserFieldSearchConstantsWithEmpty searchConstants, UserFitsNavigatorHelper userFitsNavigatorHelper, GroupManager groupManager, UserManager userManager, UserHistoryManager userHistoryManager)
           
 
Method Summary
 boolean doRelevantClausesFitFilterForm(com.atlassian.crowd.embedded.api.User user, Query query, SearchContext searchContext)
          Determines whether the given query can be represented in basic mode.
 Clause getSearchClause(com.atlassian.crowd.embedded.api.User user, FieldValuesHolder fieldValuesHolder)
          Convert the user's input into a JQL clause.
 void populateFromParams(com.atlassian.crowd.embedded.api.User user, FieldValuesHolder fieldValuesHolder, ActionParams actionParams)
          Populates a FieldValuesHolder with ActionParams.
 void populateFromQuery(com.atlassian.crowd.embedded.api.User user, FieldValuesHolder fieldValuesHolder, Query query, SearchContext searchContext)
          Populates a FieldValuesHolder from a Query.
 void validateParams(com.atlassian.crowd.embedded.api.User user, 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.transformer.UserSearchInputTransformer
getClauseName, getMatchingClauses
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KickassUserSearchInputTransformer

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

KickassUserSearchInputTransformer

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

KickassUserSearchInputTransformer

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

populateFromParams

public void populateFromParams(com.atlassian.crowd.embedded.api.User user,
                               FieldValuesHolder fieldValuesHolder,
                               ActionParams actionParams)
Populates a FieldValuesHolder with ActionParams. Values that start with "user:" refer to users, values that start with "group:" refers to groups, and "empty" refers to empty values.

Specified by:
populateFromParams in interface SearchInputTransformer
Overrides:
populateFromParams in class UserSearchInputTransformer
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 user,
                           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
Overrides:
validateParams in class UserSearchInputTransformer
Parameters:
user - 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 user,
                              FieldValuesHolder fieldValuesHolder,
                              Query query,
                              SearchContext searchContext)
Populates a FieldValuesHolder from a Query.

Specified by:
populateFromQuery in interface SearchInputTransformer
Overrides:
populateFromQuery in class UserSearchInputTransformer
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.
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

getSearchClause

public Clause getSearchClause(com.atlassian.crowd.embedded.api.User user,
                              FieldValuesHolder fieldValuesHolder)
Convert the user's input into a JQL clause. Always in the form: field IN (user1, user2, membersOf(group1), membersOf(group2), ...)

Specified by:
getSearchClause in interface SearchInputTransformer
Overrides:
getSearchClause in class UserSearchInputTransformer
Parameters:
user - 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.

doRelevantClausesFitFilterForm

public boolean doRelevantClausesFitFilterForm(com.atlassian.crowd.embedded.api.User user,
                                              Query query,
                                              SearchContext searchContext)
Determines whether the given query can be represented in basic mode.

Specified by:
doRelevantClausesFitFilterForm in interface SearchInputTransformer
Overrides:
doRelevantClausesFitFilterForm in class UserSearchInputTransformer
Parameters:
user - 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.


Copyright © 2002-2013 Atlassian. All Rights Reserved.