|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet com.yworks.yfiles.server.graphml.servlets.SaveGraphServlet
Simple abstract base servlet that can read a GraphML file from the client and write it to a stream.
Subclasses need to override createSaveStream(javax.servlet.http.HttpServletRequest)
to return a stream to which the data can be sent.
Constructor Summary | |
protected |
SaveGraphServlet()
Calls the SaveGraphServlet(String) constructor using
AbstractGraphRoundtripSupport.PARAM_GRAPH
as the parameter name. |
protected |
SaveGraphServlet(java.lang.String graphParameter)
Creates a new instance using the provided parameter to get the graphml string from the HttpServletRequest later in getGraphInputStream(javax.servlet.http.HttpServletRequest)
from. |
Method Summary | |
protected abstract java.io.OutputStream |
createSaveStream(HttpServletRequest httpServletRequest)
Create a stream for the given request to which the data will be sent. |
protected void |
doGet(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse)
|
protected void |
doPost(HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse)
|
protected java.io.InputStream |
getGraphInputStream(HttpServletRequest httpServletRequest)
Retrieves the input stream from the request to read the graphml from. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected SaveGraphServlet()
SaveGraphServlet(String)
constructor using
AbstractGraphRoundtripSupport.PARAM_GRAPH
as the parameter name.
protected SaveGraphServlet(java.lang.String graphParameter)
HttpServletRequest
later in getGraphInputStream(javax.servlet.http.HttpServletRequest)
from.
graphParameter
- the name of the parameter of null
if the ServletInputStream
shall be used.Method Detail |
protected void doPost(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, java.io.IOException
ServletException
java.io.IOException
protected java.io.InputStream getGraphInputStream(HttpServletRequest httpServletRequest) throws java.io.IOException
ServletRequest.getParameter(String)
method using the parameter name specified in the constructor.
If no parameter name has been specified the ServletInputStream
is returned.
httpServletRequest
- the request
java.io.IOException
- if something bad happened.protected abstract java.io.OutputStream createSaveStream(HttpServletRequest httpServletRequest) throws java.io.IOException
httpServletRequest
- the request that was used by the client.
java.io.IOException
- if something goes wrongprotected void doGet(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, java.io.IOException
ServletException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |