org.apache.struts2.sitegraph
Class SiteGraph
java.lang.Object
org.apache.struts2.sitegraph.SiteGraph
public class SiteGraph
- extends java.lang.Object
// START SNIPPET: javadocs-intro
SiteGraph is a tool that renders out GraphViz-generated images depicting your
Struts-powered web application's flow. SiteGraph requires GraphViz be installed
and that the "dot" executable be in your command path. You can find GraphViz
at http://www.graphviz.org.
// END SNIPPET: javadocs-intro
// START SNIPPET: javadocs-api
If you wish to use SiteGraph through its API rather than through the command line,
you can do that as well. All you need to do is create a new SiteGraph instance,
optionally specify a Writer
to output the dot content to, and then call
prepare()
.
// END SNIPPET: javadocs-api
Constructor Summary |
SiteGraph(java.lang.String configDir,
java.lang.String views,
java.lang.String output,
java.lang.String namespace)
|
Method Summary |
static void |
main(java.lang.String[] args)
|
void |
prepare()
Prepares the dot generated content and writes out to the provided writer
object. |
void |
render()
Invokes the dot command, cause GraphViz to render out.dot in the form of out.gif,
located in the specified output directory. |
void |
setWriter(java.io.Writer writer)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SiteGraph
public SiteGraph(java.lang.String configDir,
java.lang.String views,
java.lang.String output,
java.lang.String namespace)
main
public static void main(java.lang.String[] args)
throws java.io.IOException
- Throws:
java.io.IOException
prepare
public void prepare()
- Prepares the dot generated content and writes out to the provided writer
object. If no writer has been given, that a
FileWriter
pointing to "out.dot"
in the specified output directly shall be used.
render
public void render()
- Invokes the dot command, cause GraphViz to render out.dot in the form of out.gif,
located in the specified output directory. If an error occurs during this process,
the error is logged and the method completes without throwing an exception.
setWriter
public void setWriter(java.io.Writer writer)
Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.