|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.imsystems.atag.util.Utils
public class Utils
Support functions used by ATag.
Method Summary | |
---|---|
static String |
asString(Object obj)
Returns a String representation of the object parameter. |
static String |
capFirstChar(String str)
Capitalizes the first char of a given String. |
static String |
createAttribute(String name,
Object value)
Creates a single attribute for insertion into x/html tags. |
static String |
createCSV(Collection elements,
boolean quote)
Creates a comma separated String, given a Collection of objects. |
static String |
createDelimitedString(Collection elements,
char delimiter,
boolean quote)
Creates a delimited String, given a Collection of objects. |
static String |
createEventHandlerFunct(String url)
Creates a javascript call to the ATag event handler function. |
static String |
createEventHandlerFunctForm(String url)
Creates a javascript call to the ATag event handler function. |
static String |
createLitralJSArray(Collection elements,
boolean quote)
Creates a literal javascript array. |
static Object |
getValueFromBindPath(PageContext pageContext,
String bindPath)
Attempts to retrieve an object from any of the webapp scopes, given the path to the object. |
static String |
insertAttributes(String content,
String attributes)
Looks in the content parameter for the first occurance of an x/html element, and inserts the attributes parameter into that element. |
static List |
mapToStringList(Map map,
char separator)
Creates a List of Strings by joining the key value of every entry in the map, with its associated value, separated by the separator char. |
static String |
resolveRelativePath(String base,
String path,
char separator)
Resolves a relative path such as ../../path/to/it. |
static String[] |
tokenize(String str,
String delim)
Tokenizes a given String. |
static String[] |
tokenize(String str,
String delim,
boolean include)
Tokenizes a given String. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String asString(Object obj)
obj
- The object to convert to String.
public static String createDelimitedString(Collection elements, char delimiter, boolean quote)
elements
- The objects to concatenatedelimiter
- The char to use as delimiterquote
- Set true to wrap each element in single quote
public static String createCSV(Collection elements, boolean quote)
elements
- The objects to concatenatequote
- Set true to wrap each element in single quote
public static String createLitralJSArray(Collection elements, boolean quote)
elements
- The elements of the arrayquote
- Set true to wrap each element in single quote
public static String createAttribute(String name, Object value)
name
- Name of attributevalue
- Attribute value
public static String createEventHandlerFunct(String url)
url
- Optionl parameter as the location to send the event
public static String createEventHandlerFunctForm(String url)
url
- Optionl parameter as the location to send the event
public static String insertAttributes(String content, String attributes)
content
- The x/html contentattributes
- The attributes to insert
public static String[] tokenize(String str, String delim)
str
- The String to tokenizedelim
- A String containing all chars that should be
treated as delimiters
public static String[] tokenize(String str, String delim, boolean include)
str
- The String to tokenizedelim
- A String containing all chars that should be
treated as delimitersinclude
- Set true to include the delimiter in the
resulting tokens array
public static String resolveRelativePath(String base, String path, char separator)
base
- Current location as an absolute pathpath
- The relative path to resolveseparator
- Path separator char
public static Object getValueFromBindPath(PageContext pageContext, String bindPath)
pageContext
- The current page contextbindPath
- The path to the object
public static String capFirstChar(String str)
str
- The String to capitalize
public static List mapToStringList(Map map, char separator)
map
- The Map to convertseparator
- The separator to use between key and
value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |