|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.plugins.collabnet.util.CommonUtil
public class CommonUtil
Class for methods that are useful across Hudson plugins.
| Method Summary | |
|---|---|
static boolean |
getBoolean(java.lang.String key,
net.sf.json.JSONObject formData)
Returns true if the string value of the key in the form is "true". |
static java.lang.String |
getInterpreted(java.util.Map<java.lang.String,java.lang.String> envVars,
java.lang.String str)
Translates a string that may contain build vars like ${BUILD_VAR} to a string with those vars interpreted. |
static void |
logRE(java.util.logging.Logger logger,
java.lang.String methodName,
java.rmi.RemoteException re)
Convenience method to log RemoteExceptions. |
static java.util.Collection<java.lang.String> |
sanitizeForJS(java.util.Collection<java.lang.String> collection)
Escape characters that may make javascript error (like quotes or backslashes). |
static java.lang.String[] |
splitCommaStr(java.lang.String commaStr)
Given a comma-delimited string, split it into an array of strings, removing unneccessary whitespace. |
static java.lang.String |
stripSlashes(java.lang.String str)
String leading and trailing '/'s from a String. |
protected static boolean |
unset(java.lang.String value)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean getBoolean(java.lang.String key,
net.sf.json.JSONObject formData)
key - to find value for.formData - that holds key/value.
public static java.lang.String getInterpreted(java.util.Map<java.lang.String,java.lang.String> envVars,
java.lang.String str)
build - the Hudson build.str - the string to be interpreted.
java.lang.IllegalArgumentException - if the env var is not found.
public static void logRE(java.util.logging.Logger logger,
java.lang.String methodName,
java.rmi.RemoteException re)
log - to log this message to.methodName - in progress on when this exception occurred.re - The RemoteException that was thrown.public static java.util.Collection<java.lang.String> sanitizeForJS(java.util.Collection<java.lang.String> collection)
collection - list of strings to sanitize
public static java.lang.String stripSlashes(java.lang.String str)
str - string to strip.
protected static boolean unset(java.lang.String value)
value - string to test.
public static java.lang.String[] splitCommaStr(java.lang.String commaStr)
commaStr -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||