Package com.atlassian.crowd.util
Class UserUtils
java.lang.Object
com.atlassian.crowd.util.UserUtils
General utility class for email related methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UserpopulateNames(User user) Ensures that the first name, last name and displayName of the user object is fully populated.
-
Constructor Details
-
UserUtils
public UserUtils()
-
-
Method Details
-
populateNames
Ensures that the first name, last name and displayName of the user object is fully populated.Examples: Original data Populated data ("jsmith", "John", "Smith", "John Smith") ("jsmith", "John", "Smith", "John Smith") ("jsmith", "", "", "John Smith") ("jsmith", "John", "Smith", "John Smith") ("jsmith", "John", "Smith", "") ("jsmith", "John", "Smith", "John Smith") ("jsmith", "", "", "") ("jsmith", "", "jsmith", "jsmith") ("jsmith", null, null, null) ("jsmith", "", "jsmith", "jsmith") For more complicated cases, see the documentation for the other methods in this class.
- Parameters:
user- potentially partially populated user. The username of the user cannot be blank.- Returns:
- populated user with non-blank last name and displayName and non-null first name.
- See Also:
-