|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface for roundtrip support classes.
This interface adds methods to support servlets to its base interface RoundtripSupport.
| Method Summary | |
boolean |
readGraph(HttpServletRequest request,
Graph graph)
If the request contains the AbstractGraphRoundtripSupport.PARAM_GRAPH parameter, the parameter value is used for updating the graph
instance currently stored in the session.
|
void |
sendError(java.lang.String message,
HttpServletResponse response)
Send an error to the client. |
void |
sendGraph(Graph graph,
HttpServletResponse response)
Send the current graph to the client in GraphML format using UTF-8 encoding. |
| Methods inherited from interface com.yworks.yfiles.server.graphml.support.RoundtripSupport |
addMapper, addObjectMapper, createRoundtripGraph, isSupportUserTags, readGraph, readGraph, sendError, sendGraph, setSupportUserTags |
| Method Detail |
public boolean readGraph(HttpServletRequest request,
Graph graph)
throws java.io.IOException
AbstractGraphRoundtripSupport.PARAM_GRAPH parameter, the parameter value is used for updating the graph
instance currently stored in the session.
To decide whether the value of the AbstractGraphRoundtripSupport.PARAM_GRAPH parameter has to be decoded and decompressed,
the "graphEncoding" parameter is used. For example, to indicate base64-encoded, zlib-compressed and URI-encoded
data, the value has to be "base64/zlib/encodeURIComponent".
request - The servlet request
java.io.IOException - If parsing goes wrong.
public void sendGraph(Graph graph,
HttpServletResponse response)
throws java.io.IOException
UTF-8 encoding. This method will close
the response stream.
The response content type is set to "text/xml".
graph - The current graph.response - The response that will be sent to the client.
java.io.IOException - If something goes wrong during GraphML export.
public void sendError(java.lang.String message,
HttpServletResponse response)
throws java.io.IOException
<?xml version="1.0" encoding="UTF-8"?>
<response>
<errors>
<error>
<![CDATA[
error message
]]>
</error>
</errors>
</response>
message - The error message.response - The response.
java.io.IOException - If writing to the response writer fails.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||