com.xpn.xwiki.plugin.graphviz
Class GraphVizPlugin

java.lang.Object
  extended by com.xpn.xwiki.plugin.XWikiDefaultPlugin
      extended by com.xpn.xwiki.plugin.graphviz.GraphVizPlugin
All Implemented Interfaces:
XWikiPluginInterface

Deprecated. the plugin technology is deprecated

@Deprecated
public class GraphVizPlugin
extends XWikiDefaultPlugin

Plugin which wraps the GraphViz dot executable; transforming dot source files (representing graphs) into images, image maps, or other output formats supported by GraphViz.

See http://www.graphviz.org/doc/info/lang.html for the dot language specification. See http://www.graphviz.org/doc/info/output.html for the possible output formats

Version:
$Id: 642171dd2566a8a9bc58fdbc63274d97d6df4cde $

Constructor Summary
GraphVizPlugin(String name, String className, XWikiContext context)
          Deprecated. The mandatory plugin constructor, this is the method called (through reflection) by the plugin manager.
 
Method Summary
 void flushCache()
          Deprecated. Older equivalent of the XWikiDefaultPlugin.flushCache(XWikiContext) method without a context provided.
 byte[] getDotImage(String content, boolean dot)
          Deprecated. Executes GraphViz and return the content of the resulting image (PNG format).
 byte[] getDotImage(String content, String extension, boolean dot)
          Deprecated. Executes GraphViz and return the content of the resulting image (PNG format).
 String getDotImageURL(String content, boolean dot, XWikiContext context)
          Deprecated. Executes GraphViz and returns the URL for the produced file, a PNG image.
 String getDotResultURL(String content, boolean dot, String outputFormat, XWikiContext context)
          Deprecated. Executes GraphViz and returns the URL for the produced file.
 String getName()
          Deprecated. The name which can be used for accessing this plugin from XWiki.getPlugin(String, XWikiContext).
 Api getPluginApi(XWikiPluginInterface plugin, XWikiContext context)
          Deprecated. Get a public scriptable API that can be used to call methods of the (privileged) plugin.
 void init(XWikiContext context)
          Deprecated. Global initialization, called when the platform is started and the plugin list is initialized.
 void outputDotImage(String content, boolean dot, XWikiContext context)
          Deprecated. Executes GraphViz and writes the resulting image (PNG format) into the response.
 void outputDotImage(String content, String extension, boolean dot, XWikiContext context)
          Deprecated. Executes GraphViz and writes the resulting image (in the requested format) into the response.
 void outputDotImageFromFile(String filename, XWikiContext context)
          Deprecated. Writes an already generated result from the temporary file into the response.
 String writeDotImage(String content, boolean dot)
          Deprecated. Executes GraphViz, writes the resulting image (PNG format) in a temporary file on disk, and returns the filename which can be later used in outputDotImageFromFile(String, XWikiContext).
 String writeDotImage(String content, String extension, boolean dot)
          Deprecated. Executes GraphViz, writes the resulting image (in the requested format) in a temporary file on disk, and returns the filename which can be later used in outputDotImageFromFile(String, XWikiContext).
 
Methods inherited from class com.xpn.xwiki.plugin.XWikiDefaultPlugin
beginParsing, beginRendering, commonTagsHandler, downloadAttachment, endParsing, endRendering, endRenderingHandler, flushCache, getClassName, insidePREHandler, outsidePREHandler, setClassName, setName, startRenderingHandler, virtualInit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphVizPlugin

public GraphVizPlugin(String name,
                      String className,
                      XWikiContext context)
Deprecated. 
The mandatory plugin constructor, this is the method called (through reflection) by the plugin manager.

Parameters:
name - the plugin name
className - the name of this class, ignored
context - the current request context
Method Detail

getName

public String getName()
Deprecated. 
Description copied from interface: XWikiPluginInterface
The name which can be used for accessing this plugin from XWiki.getPlugin(String, XWikiContext).

Specified by:
getName in interface XWikiPluginInterface
Overrides:
getName in class XWikiDefaultPlugin
Returns:
the plugin name, usually a lowercase identifier

getPluginApi

public Api getPluginApi(XWikiPluginInterface plugin,
                        XWikiContext context)
Deprecated. 
Description copied from interface: XWikiPluginInterface
Get a public scriptable API that can be used to call methods of the (privileged) plugin.

Specified by:
getPluginApi in interface XWikiPluginInterface
Overrides:
getPluginApi in class XWikiDefaultPlugin
Parameters:
plugin - the plugin instance to wrap
context - the current request context
Returns:
an instance of the corresponding API, or null if the plugin doesn't want to expose a public API

flushCache

public void flushCache()
Deprecated. 
Description copied from class: XWikiDefaultPlugin
Older equivalent of the XWikiDefaultPlugin.flushCache(XWikiContext) method without a context provided.

Overrides:
flushCache in class XWikiDefaultPlugin

init

public void init(XWikiContext context)
Deprecated. 
Description copied from interface: XWikiPluginInterface
Global initialization, called when the platform is started and the plugin list is initialized.

Specified by:
init in interface XWikiPluginInterface
Overrides:
init in class XWikiDefaultPlugin
Parameters:
context - the current context, should not be stored since it will become mostly unreliable once the initial request is terminated

getDotImageURL

public String getDotImageURL(String content,
                             boolean dot,
                             XWikiContext context)
                      throws IOException
Deprecated. 
Executes GraphViz and returns the URL for the produced file, a PNG image.

Parameters:
content - the dot source
dot - which engine to execute: dot if true, neato if false
context - the current request context
Returns:
the URL which can be used to access the generated image
Throws:
IOException - if writing the input or output files to the disk fails
See Also:
allows to chose another output format instead of PNG

getDotResultURL

public String getDotResultURL(String content,
                              boolean dot,
                              String outputFormat,
                              XWikiContext context)
                       throws IOException
Deprecated. 
Executes GraphViz and returns the URL for the produced file.

Parameters:
content - the dot source code
dot - which engine to execute: dot if true, neato if false
outputFormat - the output format to use
context - the current request context
Returns:
the URL which can be used to access the result
Throws:
IOException - if writing the input or output files to the disk fails
See Also:
if the output should be a simple PNG image

getDotImage

public byte[] getDotImage(String content,
                          boolean dot)
                   throws IOException
Deprecated. 
Executes GraphViz and return the content of the resulting image (PNG format).

Parameters:
content - the dot source code
dot - which engine to execute: dot if true, neato if false
Returns:
the content of the generated image
Throws:
IOException - if writing the input or output files to the disk fails

getDotImage

public byte[] getDotImage(String content,
                          String extension,
                          boolean dot)
                   throws IOException
Deprecated. 
Executes GraphViz and return the content of the resulting image (PNG format).

Parameters:
content - the dot source code
extension - the output file extension
dot - which engine to execute: dot if true, neato if false
Returns:
the content of the generated file
Throws:
IOException - if writing the input or output files to the disk fails

writeDotImage

public String writeDotImage(String content,
                            boolean dot)
                     throws IOException
Deprecated. 
Executes GraphViz, writes the resulting image (PNG format) in a temporary file on disk, and returns the filename which can be later used in outputDotImageFromFile(String, XWikiContext).

Parameters:
content - the dot source code
dot - which engine to execute: dot if true, neato if false
Returns:
the name of the file where the generated output is stored
Throws:
IOException - if writing the input or output files to the disk fails

writeDotImage

public String writeDotImage(String content,
                            String extension,
                            boolean dot)
                     throws IOException
Deprecated. 
Executes GraphViz, writes the resulting image (in the requested format) in a temporary file on disk, and returns the filename which can be later used in outputDotImageFromFile(String, XWikiContext).

Parameters:
content - the dot source code
extension - the output file extension
dot - which engine to execute: dot if true, neato if false
Returns:
the name of the file where the generated output is stored
Throws:
IOException - if writing the input or output files to the disk fails

outputDotImage

public void outputDotImage(String content,
                           boolean dot,
                           XWikiContext context)
                    throws IOException
Deprecated. 
Executes GraphViz and writes the resulting image (PNG format) into the response.

Parameters:
content - the dot source code
dot - which engine to execute: dot if true, neato if false
context - the current request context
Throws:
IOException - if writing the input or output files to the disk fails, or if writing the response body fails

outputDotImage

public void outputDotImage(String content,
                           String extension,
                           boolean dot,
                           XWikiContext context)
                    throws IOException
Deprecated. 
Executes GraphViz and writes the resulting image (in the requested format) into the response.

Parameters:
content - the dot source code
extension - the output file extension
dot - which engine to execute: dot if true, neato if false
context - the current request context
Throws:
IOException - if writing the input or output files to the disk fails, or if writing the response body fails

outputDotImageFromFile

public void outputDotImageFromFile(String filename,
                                   XWikiContext context)
                            throws IOException
Deprecated. 
Writes an already generated result from the temporary file into the response.

Parameters:
filename - the name of the temporary file, previously returned by writeDotImage(String, String, boolean)
context - the current request context
Throws:
IOException - if reading the file from the disk fails, or if writing the response body fails


Copyright © 2004–2014 XWiki. All rights reserved.