public class

FindMixedCaseUsernames

extends Object
java.lang.Object
   ↳ com.atlassian.jira.upgrade.tasks.util.FindMixedCaseUsernames

Class Overview

Factory for various consumers that are handy in upgrade tasks that need to force old username references to lowercase. Null values are tolerated/ignored, and an internal cache is used to reduce redundant effort where possible.

Summary

Public Constructors
FindMixedCaseUsernames()
Public Methods
static EntityListConsumer<GenericValue, Map<StringString>> fromColumn(String columnName)
Consumer that returns a map of mixed-case usernames that were found from a columns(String) query to their lowercase equivalents.
static EntityListConsumer<GenericValue, Map<StringList<Long>>> fromColumnAndReturnIds(String columnName)
Consumer that returns a map of lowercase versions of the mixed-case usernames that were found from a columns(String) query to a list of the associated entity IDs for the rows that contained a mixed-case username.
static EntityListConsumer<StringMap<StringString>> fromStrings()
Consumer that returns a map of mixed-case usernames that were found from a distinctString(String) query to their lowercase equivalents.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public FindMixedCaseUsernames ()

Public Methods

public static EntityListConsumer<GenericValue, Map<StringString>> fromColumn (String columnName)

Consumer that returns a map of mixed-case usernames that were found from a columns(String) query to their lowercase equivalents. The column list must include the same columnName, but need not include any others.

The resulting map might, for example, have a key of "Fred" with a corresponding value of "fred".

public static EntityListConsumer<GenericValue, Map<StringList<Long>>> fromColumnAndReturnIds (String columnName)

Consumer that returns a map of lowercase versions of the mixed-case usernames that were found from a columns(String) query to a list of the associated entity IDs for the rows that contained a mixed-case username. The column list must include the same columnName and "id", but need not include any others.

The resulting map might, for example, have a key of "fred" with a corresponding value list of [10100, 10300, 10201, 10210, 10200]. The list should not be assumed to be in any particular order.

public static EntityListConsumer<StringMap<StringString>> fromStrings ()

Consumer that returns a map of mixed-case usernames that were found from a distinctString(String) query to their lowercase equivalents.

The resulting map might, for example, have a key of "Fred" with a corresponding value of "fred".