com.atlassian.jira.util
Class ParameterUtils

java.lang.Object
  |
  +--com.atlassian.jira.util.ParameterUtils

public class ParameterUtils
extends java.lang.Object


Field Summary
protected static long DAY
           
protected static long HOUR
           
protected static long MONTH
           
protected static long WEEK
           
 
Constructor Summary
ParameterUtils()
           
 
Method Summary
static java.util.List getAssigneeTypes()
           
static java.util.Date getDateParam(java.util.Map params, java.lang.String s)
           
static java.lang.String getDateParam(SearchRequest searchRequest, java.lang.String name)
           
static java.lang.Double getDoubleParam(java.util.Map params, java.lang.String key)
           
static java.util.List getListParam(java.util.Map params, java.lang.String key)
          Create a List from the parameter with the specified key.
static java.util.List getListParamKeepMinusOnes(java.util.Map params, java.lang.String key)
           
static java.util.List getLongListFromStringArray(java.lang.String[] ar)
          Given an array of Strings, return a list of Longs representing the IDs
static java.lang.Long getLongParam(java.util.Map params, java.lang.String key)
           
static java.lang.Long getPreviousParam(SearchRequest searchRequest, java.lang.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 java.util.List getReporterTypes()
           
static java.lang.String getSingleFilterParam(SearchRequest searchRequest, java.lang.String name)
           
static java.lang.String getSRQueryString(IssueNavigator issueNavigator)
          This method returns a query string representing the current search request
static java.lang.String[] getStringArrayFromList(java.util.List entities)
          Given a list of entities, return an array of Strings representing the IDs
static java.lang.String getStringParam(java.util.Map params, java.lang.String key)
           
static java.util.Collection getTimePeriods()
          The time periods for filtering by last updated and date created.
static com.opensymphony.module.user.User getUserParam(java.util.Map params, java.lang.String s)
           
static java.util.List makeListLong(java.util.List list)
          Make a list of Strings into a list of Longs
static java.util.Collection swapNulls(java.util.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
 

Field Detail

HOUR

protected static long HOUR

DAY

protected static long DAY

WEEK

protected static long WEEK

MONTH

protected static long MONTH
Constructor Detail

ParameterUtils

public ParameterUtils()
Method Detail

getDateParam

public static java.util.Date getDateParam(java.util.Map params,
                                          java.lang.String s)

getUserParam

public static com.opensymphony.module.user.User getUserParam(java.util.Map params,
                                                             java.lang.String s)

getListParam

public static java.util.List getListParam(java.util.Map params,
                                          java.lang.String key)
Create a List from the parameter with the specified key.

Parameters:
params -
key -
Returns:
null if the object is not a String array, or has no elements
otherwise it returns a List containing all elements of the String array, with the Strings over value ("-1") turned into null's. (Strings with value "" are ignored).

getListParamKeepMinusOnes

public static java.util.List getListParamKeepMinusOnes(java.util.Map params,
                                                       java.lang.String key)

makeListLong

public static java.util.List makeListLong(java.util.List list)
Make a list of Strings into a list of Longs


getStringParam

public static java.lang.String getStringParam(java.util.Map params,
                                              java.lang.String key)

getLongParam

public static java.lang.Long getLongParam(java.util.Map params,
                                          java.lang.String key)

getDoubleParam

public static java.lang.Double getDoubleParam(java.util.Map params,
                                              java.lang.String key)

swapNulls

public static java.util.Collection swapNulls(java.util.Collection col)
Convert all null values in a collection into "-1"s.


getSingleFilterParam

public static java.lang.String getSingleFilterParam(SearchRequest searchRequest,
                                                    java.lang.String name)

getDateParam

public static java.lang.String getDateParam(SearchRequest searchRequest,
                                            java.lang.String name)

getPreviousParam

public static java.lang.Long getPreviousParam(SearchRequest searchRequest,
                                              java.lang.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)


getLongListFromStringArray

public static java.util.List getLongListFromStringArray(java.lang.String[] ar)
Given an array of Strings, return a list of Longs representing the IDs


getStringArrayFromList

public static java.lang.String[] getStringArrayFromList(java.util.List entities)
Given a list of entities, return an array of Strings representing the IDs


getSRQueryString

public static java.lang.String getSRQueryString(IssueNavigator issueNavigator)
This method returns a query string representing the current search request


getTimePeriods

public static java.util.Collection getTimePeriods()
The time periods for filtering by last updated and date created. All time periods are in minutes


getReporterTypes

public static java.util.List getReporterTypes()

getAssigneeTypes

public static java.util.List getAssigneeTypes()


Copyright © 2002-2003 Atlassian. All Rights Reserved.