|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.ParameterUtils
Nested Class Summary | |
static class |
ParameterUtils.DateTooEarlyException
|
Constructor Summary | |
ParameterUtils()
|
Method Summary | |
static Date |
getDateParam(Map params,
String s,
Locale locale)
|
static Long |
getDatePeriodParam(SearchRequest searchRequest,
String name)
Get the period, and then try to work out approximately what they meant (because the period is constantly changing this is not exact but should work most - all? - of the time) |
static Double |
getDoubleParam(Map params,
String key)
|
static String |
getFormattedDateParam(SearchRequest searchRequest,
String name,
Locale locale)
|
static List |
getListFromStringArray(String[] ar)
|
static List |
getListParam(Map params,
String key)
Create a List from the parameter with the specified key. |
static List |
getListParamKeepMinusOnes(Map params,
String key)
|
static List |
getLongListFromStringArray(String[] ar)
Given an array of Strings, return a list of Longs representing the IDs |
static Long |
getLongParam(Map params,
String key)
|
static String |
getSingleFilterParam(SearchRequest searchRequest,
String name)
|
static String[] |
getStringArrayFromList(Collection entities)
Given a collection of entities, return an array of Strings representing the IDs |
static String |
getStringParam(Map params,
String key)
|
static String |
getStringParam(Map params,
String targetKey,
String targetValue,
String desiredKey)
Searches through the Map (params) for the given targetKey and targetValue extracting the index (i) and uses this to extract the corresponding index value with the desiredKey. |
static User |
getUserParam(Map params,
String s)
|
static String |
makeCommaSeparated(Long[] longs)
|
static List |
makeListLong(List list)
Make a list of Strings into a list of Longs |
static boolean |
paramContains(Map params,
String key,
String value)
Checks if the given key, value pair exists in the given params Map |
static Date |
parseDate(String paramValue,
Locale locale)
|
static Collection |
swapNulls(Collection col)
Convert all null values in a collection into "-1"s. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ParameterUtils()
Method Detail |
public static Date getDateParam(Map params, String s, Locale locale) throws ParameterUtils.DateTooEarlyException
ParameterUtils.DateTooEarlyException
public static Date parseDate(String paramValue, Locale locale)
public static User getUserParam(Map params, String s)
public static List getListParam(Map params, String key)
params
- key
-
public static List getListParamKeepMinusOnes(Map params, String key)
public static List makeListLong(List list)
public static String getStringParam(Map params, String key)
public static String getStringParam(Map params, String targetKey, String targetValue, String desiredKey)
params
- targetKey
- targetValue
- desiredKey
-
public static boolean paramContains(Map params, String key, String value)
params
- key
- value
-
public static Long getLongParam(Map params, String key)
public static Double getDoubleParam(Map params, String key)
public static Collection swapNulls(Collection col)
public static String getSingleFilterParam(SearchRequest searchRequest, String name)
public static String getFormattedDateParam(SearchRequest searchRequest, String name, Locale locale)
public static Long getDatePeriodParam(SearchRequest searchRequest, String name)
public static List getLongListFromStringArray(String[] ar)
public static List getListFromStringArray(String[] ar)
public static String[] getStringArrayFromList(Collection entities)
public static String makeCommaSeparated(Long[] longs)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |