Class KickassUserSearchInputTransformer
java.lang.Object
com.atlassian.jira.issue.search.searchers.transformer.UserSearchInputTransformer
com.atlassian.jira.issue.search.searchers.transformer.KickassUserSearchInputTransformer
- All Implemented Interfaces:
SearchInputTransformer
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
ConstructorsConstructorDescriptionKickassUserSearchInputTransformer(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
Modifier and TypeMethodDescriptionbooleandoRelevantClausesFitFilterForm(ApplicationUser user, Query query, SearchContext searchContext) Determines whether the given query can be represented in basic mode.getSearchClause(ApplicationUser user, FieldValuesHolder fieldValuesHolder) Convert the user's input into a JQL clause.voidpopulateFromParams(ApplicationUser user, FieldValuesHolder fieldValuesHolder, ActionParams actionParams) Populates aFieldValuesHolderwithActionParams.voidpopulateFromQuery(ApplicationUser user, FieldValuesHolder fieldValuesHolder, Query query, SearchContext searchContext) Populates aFieldValuesHolderfrom aQuery.voidvalidateParams(ApplicationUser user, SearchContext searchContext, FieldValuesHolder fieldValuesHolder, I18nHelper i18nHelper, ErrorCollection errors) Adds error messages 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
-
Constructor Details
-
Method Details
-
populateFromParams
public void populateFromParams(ApplicationUser user, FieldValuesHolder fieldValuesHolder, ActionParams actionParams) Populates aFieldValuesHolderwithActionParams.Values that start with "user:" refer to users, values that start with "group:" refers to groups, and "empty" refers to empty values.
- Specified by:
populateFromParamsin interfaceSearchInputTransformer- Overrides:
populateFromParamsin classUserSearchInputTransformer- 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(ApplicationUser user, SearchContext searchContext, FieldValuesHolder fieldValuesHolder, I18nHelper i18nHelper, ErrorCollection errors) Description copied from interface:SearchInputTransformerAdds error messages to the errors object if values in the fieldValuesHolder fails validation. This should be called once the fieldValuesHolder has been populated.- Specified by:
validateParamsin interfaceSearchInputTransformer- Overrides:
validateParamsin classUserSearchInputTransformer- 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(ApplicationUser user, FieldValuesHolder fieldValuesHolder, Query query, SearchContext searchContext) Populates aFieldValuesHolderfrom aQuery.- Specified by:
populateFromQueryin interfaceSearchInputTransformer- Overrides:
populateFromQueryin classUserSearchInputTransformer- 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
Convert the user's input into a JQL clause. Always in the form:field IN (user1, user2, membersOf(group1), membersOf(group2), ...)
- Specified by:
getSearchClausein interfaceSearchInputTransformer- Overrides:
getSearchClausein classUserSearchInputTransformer- Parameters:
user- performing this action.fieldValuesHolder- contains values populated by the searchers- Returns:
- a
Clausethat represents the users search based on the fieldValuesHolder; null if this searcher has no responsibility in the given input.
-
doRelevantClausesFitFilterForm
public boolean doRelevantClausesFitFilterForm(ApplicationUser user, Query query, SearchContext searchContext) Determines whether the given query can be represented in basic mode.- Specified by:
doRelevantClausesFitFilterFormin interfaceSearchInputTransformer- Overrides:
doRelevantClausesFitFilterFormin classUserSearchInputTransformer- 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.
-