com.atlassian.jira.issue.search.searchers.util
Class UserFitsNavigatorHelper

java.lang.Object
  extended by com.atlassian.jira.issue.search.searchers.util.UserFitsNavigatorHelper

public class UserFitsNavigatorHelper
extends java.lang.Object

This is a helper class for determining if a user fits in the navigator.

Since:
v4.0

Constructor Summary
UserFitsNavigatorHelper(UserPickerSearchService userPickerSearchService)
           
 
Method Summary
 java.lang.String checkUser(java.lang.String name)
          This method checks if the user exists and will fit in the navigator, and returns the value that should be shown in the navigator.
 boolean isFullNameAndEmailSearchingEnabled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserFitsNavigatorHelper

public UserFitsNavigatorHelper(UserPickerSearchService userPickerSearchService)
Method Detail

checkUser

public java.lang.String checkUser(java.lang.String name)
This method checks if the user exists and will fit in the navigator, and returns the value that should be shown in the navigator. It first checks if the user exists under the given name as the username but lowercased. If that fails and the user full name search option is on, it checks if the user exists with the given name as the fullname or email, if it does, null is returned because that means that the query will not fit in the simple navigator. If the user is not found by any means, then the passed in name is returned.

Parameters:
name - the username or fullname of the user to search for
Returns:
the username of the user if found by username, null if found by the full name or the passed in name if not found.

isFullNameAndEmailSearchingEnabled

public boolean isFullNameAndEmailSearchingEnabled()


Copyright © 2002-2011 Atlassian. All Rights Reserved.