|
Openfire 3.7.1 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.openfire.clearspace.WSUtils
public class WSUtils
Several utilities to handle REST webservices.
| Constructor Summary | |
|---|---|
WSUtils()
|
|
| Method Summary | |
|---|---|
static String |
formatDate(Date date)
Formats a date into yyyy-MM-dd'T'HH:mm:ss.SSSZ, for example 2008-02-13T18:54:29.147-03:00 |
protected static String |
getElementText(org.dom4j.Node node,
String name)
Returns the text of the first an element with name 'name'. |
protected static String |
getReturn(org.dom4j.Element element)
Returns the text of the first an element with name 'return'. |
protected static String |
marshallList(List<String> data)
|
protected static void |
modifyElementText(org.dom4j.Element element,
String[] path,
String newValue)
|
protected static void |
modifyElementText(org.dom4j.Node node,
String name,
String newValue)
Modifies the text of the elmement with name 'name'. |
static Date |
parseDate(String date)
Parses a date of the form 1969-12-31T21:00:00-03:00, or 2008-02-13T18:54:29.147-03:00. |
protected static List<String> |
parseStringArray(org.dom4j.Element element)
Parse REST responses of the type String[], that are XML of the form: |
protected static List<String> |
parseUsernameArray(org.dom4j.Element element)
Parse REST responses of the type String[] that represent usernames, that are XML of the form: |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WSUtils()
| Method Detail |
|---|
protected static String getReturn(org.dom4j.Element element)
element - the element to search for a return element.
protected static String getElementText(org.dom4j.Node node,
String name)
node - the element to search for a "name" element.name - the name of the element to search
protected static void modifyElementText(org.dom4j.Node node,
String name,
String newValue)
node - the element to searchname - the name to searchnewValue - the new value of the text
protected static void modifyElementText(org.dom4j.Element element,
String[] path,
String newValue)
protected static List<String> parseStringArray(org.dom4j.Element element)
element - Element from REST response to be parsed.
protected static List<String> parseUsernameArray(org.dom4j.Element element)
element - Element from REST response to be parsed.
protected static String marshallList(List<String> data)
public static Date parseDate(String date)
date - the string to parse
public static String formatDate(Date date)
date - the date to format
|
Openfire 3.7.1 Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||