com.yworks.yfiles.server.svg
Class SVGServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.yworks.yfiles.server.tiles.servlet.BaseServlet
com.yworks.yfiles.server.svg.SVGServlet
- All Implemented Interfaces:
- Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class SVGServlet
- extends BaseServlet
This Servlet serves a graph as SVG.
- See Also:
- Serialized Form
Methods inherited from class com.yworks.yfiles.server.tiles.servlet.BaseServlet |
addViewConfigurator, cachedGraphs, cacheGraph, doGet, doPost, getEdgeDescription, getEdgeURL, getForId, getGraph, getGraphBounds, getGraphContentBounds, getId, getId, getId, getId, getNodeDescription, getNodeURL, getReadWriteLock, getSessionMonitor, getViewConfigurators, getWriter, hasDescriptions, hasURLs, init, initialize, isUseJSONPrefixing, lookupId, lookupId, lookupId, lookupId, newGraph, readLock, registerLicense, removeViewConfigurator, setEdgeDescription, setEdgeURL, setNodeDescription, setNodeURL, uncacheGraph, unlockRead, unlockWrite, updateEdgePaths, validateIds, writeContentBounds, writeLock, writeWorldBounds |
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, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_SVG_BORDER
public static final int DEFAULT_SVG_BORDER
- See Also:
- Constant Field Values
SVGServlet
public SVGServlet()
handleGetRequest
protected void handleGetRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Returns the requested graph in svg format.
Supports the following request parameters:
- path: String (required)
- The name of the cached graph.
- border: int (optional)
- The border width of the graph.
- prefix: String (optional)
- The prefix of generated SVG-IDs.
If the requested graph could not be found, the response will be a 404
error.
- Overrides:
handleGetRequest
in class BaseServlet
- Parameters:
request
- The requestresponse
- The response
- Throws:
javax.servlet.ServletException
IOException
configureRewriteRenderer
protected void configureRewriteRenderer(SVGGraph2DRewriteRenderer renderer,
SVGRenderContext ctx)
- Registers the
SVGIdRewriteGraphVisitor
if there is a prefix. Can be overriden
to further customize the generated SVG.
- Parameters:
renderer
- The rendererctx
- The context
createSVGIOHandler
protected yext.svg.io.SVGIOHandler createSVGIOHandler()
- Creates a new SVGIOHandler.
- Returns:
- The new SVGIOHandler
handlePostRequest
protected void handlePostRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
IOException
- Redirects to
SVGServlet.handleGetRequest
.
- Overrides:
handlePostRequest
in class BaseServlet
- Parameters:
request
- The requestresponse
- The response
- Throws:
javax.servlet.ServletException
IOException
Copyright © 2006-2013 yWorks GmbH. All rights reserved