| java.lang.Object org.tigris.scarab.util.ScarabUtil
ScarabUtil | public class ScarabUtil (Code) | | A Utility class for code that doesn't really go other places.
author: Jon Scott Stevens version: $Id: ScarabUtil.java 10281 2006-09-07 23:47:01Z jorgeuriarte $ |
contains | final public static boolean contains(Object[] array, Object obj)(Code) | | Check whether Object array contains passed in object.
|
findValue | public static String findValue(RunData runData, String name)(Code) | | Finds the first value for the named request parameter. This is
useful to handle the case when there are more than one of the
named key fields present on a screen.
Parameters: runData - Source of the export format information. Parameters: name - The name of the request parameter to get a valuefor. The format type, or null if indeterminate. |
fixEOLs | public static String fixEOLs(String str)(Code) | | Hack to replace the string "\n" with EOL characters...
string.replaceAll("\\n","\n") does not work.
Originally part of SimpleHandler but useful as utility method.
|
initializeScarab | public static void initializeScarab()(Code) | | System global initialization.
Useful for random stuff that needs initialization early.
|
linkifyText | public static String linkifyText(String input, ScarabLink link, Module module) throws Exception(Code) | | It uses the IssueIdParser to convert all issue id's into links.
The output is enclosed into a <,pre>...<,/pre> bracket pair so that
simple markup (line breaks, white spaces) is preserved.
|
urlEncode | final public static String urlEncode(String in)(Code) | | URL encodes in . If the string is null, nothing will be
written. This method is faster than urlEncodeSlow if the string to
encode does not contain any characters needing encoding. It adds some
penalty for strings which actually need to be encoded. for short strings
~20 characters the upside is a 75% decrease. while the penalty is a 10%
increase. As many query parameters do not need encoding even in i18n
applications it should be much better to delay the byte conversion.
Parameters: in - the String to encode. the url-encoded string. |
|
|