org.apache.struts2.sitegraph

## Class SiteGraph

- java.lang.Object
- - org.apache.struts2.sitegraph.SiteGraph

-     public class SiteGraph
      extends Object

  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.

  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()`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SiteGraph(String configDir, String views, String output, String namespace)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(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(Writer writer)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SiteGraph

          public SiteGraph(String configDir,
                           String views,
                           String output,
                           String namespace)

  - ### Method Detail

    - #### main

          public static void main(String[] args)
                           throws IOException

      Throws:
        `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(Writer writer)

Copyright © 2000–2023 Apache Software Foundation. All rights reserved.