|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjetbrains.buildServer.controllers.XmlResponseUtil
public class XmlResponseUtil
Utility class containing a set of useful methods for controllers producing XML responses (in particular for controllers processing AJAX requests).
| Method Summary | |
|---|---|
static org.jdom.Element |
newXmlResponse()
Creates new document with <response/> tag as its root element. |
static void |
writeErrors(org.jdom.Element xmlResponse,
ActionErrors errors)
Writes the specified errors into the XML response |
static void |
writeFormModifiedIfNeeded(org.jdom.Element xmlResponse,
StatefulObject state)
Adds <modified/> tag to XML response if method StatefulObject.isStateModified() returns true. |
static void |
writeRedirect(org.jdom.Element xmlResponse,
java.lang.String url)
Adds <redirect/> tag to XML response which will contain the specified url inside. |
static void |
writeTestResult(org.jdom.Element xmlResponse,
java.lang.String additionalInfo)
Adds <testConnectionResult/> tag into the XML response which contains specified additionalInfo parameter inside. |
static void |
writeXmlResponse(org.jdom.Element xmlResponse,
javax.servlet.http.HttpServletResponse response)
Serializes the specified xml response to output stream of the HTTP servlet response. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static org.jdom.Element newXmlResponse()
public static void writeXmlResponse(org.jdom.Element xmlResponse,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
xmlResponse - XML document to serializeresponse - HTTP response
java.io.IOException - if an IO error occures
public static void writeFormModifiedIfNeeded(org.jdom.Element xmlResponse,
StatefulObject state)
StatefulObject.isStateModified() returns true.
xmlResponse - XML responsestate - object which state to check
public static void writeRedirect(org.jdom.Element xmlResponse,
java.lang.String url)
xmlResponse - XML responseurl - an URL
public static void writeErrors(org.jdom.Element xmlResponse,
ActionErrors errors)
xmlResponse - XML responseerrors - errors
public static void writeTestResult(org.jdom.Element xmlResponse,
java.lang.String additionalInfo)
xmlResponse - XML responseadditionalInfo - parameter
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||