The yFiles FLEX server API provides servlet classes that facilitate the most common tasks in a web diagramming application. This section briefly introduces these servlets.
LoadGraphServlet
is an abstract servlet class that allows to read a file from an input stream
and send it to the client.
Subclasses will only have to override the
getInputStream()
method.
SaveGraphServlet
is an abstract servlet class that allows to save a graph that was send from the
client.
SaveGraphServlet uses either a parameter of the request or the request input
stream to read the data that is to be saved.
Subclasses only have to override the
createSaveStream()
method.
DownloadServlet
is a ready-to-use servlet that can be used for saving a graph on the client.
The response is sent using the attachement content type, so that the client
application will show a download dialog.
DownloadServlet uses either a parameter of the request or the request input
stream to read the data that is to be saved on the client.
UploadServlet
is a ready-to-use servlet that can be used for loading a graph from the
client's file system.
The data is retrieved from the request's input stream sent back in the response.
This servlet expects "multipart/form-data" as sent from a call to
flash.net.FileReference.upload or a
UploadHandler
.
ExportServlet
simply takes the export data from the request and creates a file download for it.
The data is either taken from the response parameter provided in the constructor,
or the request's input stream is used.
For customization, the method
getExportDataInputStream()
can be overridden.
Copyright ©2007-2015, yWorks GmbH. All rights reserved. |