com.pyxis.greenhopper.jira.util
Class ToolBox

java.lang.Object
  extended by com.pyxis.greenhopper.jira.util.ToolBox

public class ToolBox
extends java.lang.Object


Constructor Summary
ToolBox()
           
 
Method Summary
static java.lang.String[] addToArray(java.lang.String[] array, java.lang.String value)
           
static java.util.Collection<java.lang.Long> asLongList(java.lang.String[] values)
           
static java.util.Collection<java.lang.String> asStringList(java.util.List<java.lang.Long> values)
           
static java.lang.String[] copyOf(java.lang.String[] array, int length)
           
static java.lang.String getDurationInHours(java.lang.Long time)
           
static java.lang.String getIssueKeysArray(java.util.Collection<com.atlassian.jira.issue.Issue> issues)
           
static java.lang.String getIssueKeysQueryString(java.util.Collection<com.atlassian.jira.issue.Issue> issues)
           
static java.lang.String htmlEncode(java.lang.String txt)
           
static boolean isLong(java.lang.String string)
           
static java.lang.String javascriptEncode(java.lang.String txt)
           
static java.lang.String longsAsString(java.util.Collection<java.lang.Long> values)
           
static java.util.Date now()
           
static double roundUp(double value, int scale)
           
static java.lang.String stringsAsString(java.util.Collection<java.lang.String> values, boolean allowEmptyValues)
           
static java.lang.Long[] toLongArray(java.util.Collection<java.lang.Long> setOfLong)
           
static java.util.Map toParams(java.lang.String key, java.lang.String name)
           
static java.lang.String[] toStringArray(java.util.Collection<java.lang.String> setOfString)
           
static java.lang.String urlEncode(java.lang.String txt)
           
static void validateNonNegativeDuration(java.lang.String duration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolBox

public ToolBox()
Method Detail

getIssueKeysQueryString

public static java.lang.String getIssueKeysQueryString(java.util.Collection<com.atlassian.jira.issue.Issue> issues)

getIssueKeysArray

public static java.lang.String getIssueKeysArray(java.util.Collection<com.atlassian.jira.issue.Issue> issues)

validateNonNegativeDuration

public static void validateNonNegativeDuration(java.lang.String duration)
                                        throws GreenHopperException
Throws:
GreenHopperException

getDurationInHours

public static java.lang.String getDurationInHours(java.lang.Long time)

roundUp

public static double roundUp(double value,
                             int scale)

htmlEncode

public static java.lang.String htmlEncode(java.lang.String txt)

javascriptEncode

public static java.lang.String javascriptEncode(java.lang.String txt)

urlEncode

public static java.lang.String urlEncode(java.lang.String txt)

stringsAsString

public static java.lang.String stringsAsString(java.util.Collection<java.lang.String> values,
                                               boolean allowEmptyValues)

longsAsString

public static java.lang.String longsAsString(java.util.Collection<java.lang.Long> values)

asLongList

public static java.util.Collection<java.lang.Long> asLongList(java.lang.String[] values)

asStringList

public static java.util.Collection<java.lang.String> asStringList(java.util.List<java.lang.Long> values)

toStringArray

public static java.lang.String[] toStringArray(java.util.Collection<java.lang.String> setOfString)

toLongArray

public static java.lang.Long[] toLongArray(java.util.Collection<java.lang.Long> setOfLong)

now

public static java.util.Date now()

isLong

public static boolean isLong(java.lang.String string)

addToArray

public static java.lang.String[] addToArray(java.lang.String[] array,
                                            java.lang.String value)

copyOf

public static java.lang.String[] copyOf(java.lang.String[] array,
                                        int length)

toParams

public static java.util.Map toParams(java.lang.String key,
                                     java.lang.String name)


Copyright © 2007-2013 Atlassian. All Rights Reserved.