@Deprecated public class GraphVizPlugin extends XWikiDefaultPlugin
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
Constructor and Description |
---|
GraphVizPlugin(String name,
String className,
XWikiContext context)
Deprecated.
The mandatory plugin constructor, this is the method called (through reflection) by the plugin manager.
|
Modifier and Type | Method and Description |
---|---|
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) . |
beginParsing, beginRendering, commonTagsHandler, downloadAttachment, endParsing, endRendering, endRenderingHandler, flushCache, getClassName, insidePREHandler, outsidePREHandler, setClassName, setName, startRenderingHandler, virtualInit
public GraphVizPlugin(String name, String className, XWikiContext context)
name
- the plugin nameclassName
- the name of this class, ignoredcontext
- the current request contextpublic String getName()
XWikiPluginInterface
XWiki.getPlugin(String, XWikiContext)
.getName
in interface XWikiPluginInterface
getName
in class XWikiDefaultPlugin
public Api getPluginApi(XWikiPluginInterface plugin, XWikiContext context)
XWikiPluginInterface
getPluginApi
in interface XWikiPluginInterface
getPluginApi
in class XWikiDefaultPlugin
plugin
- the plugin instance to wrapcontext
- the current request contextnull
if the plugin doesn't want to expose a public APIpublic void flushCache()
XWikiDefaultPlugin
XWikiDefaultPlugin.flushCache(XWikiContext)
method without a context provided.flushCache
in class XWikiDefaultPlugin
public void init(XWikiContext context)
XWikiPluginInterface
init
in interface XWikiPluginInterface
init
in class XWikiDefaultPlugin
context
- the current context, should not be stored since it will become mostly unreliable once the initial
request is terminatedpublic String getDotImageURL(String content, boolean dot, XWikiContext context) throws IOException
content
- the dot sourcedot
- which engine to execute: dot
if true
, neato
if false
context
- the current request contextIOException
- if writing the input or output files to the disk failsallows to chose another output format instead of PNG
public String getDotResultURL(String content, boolean dot, String outputFormat, XWikiContext context) throws IOException
content
- the dot source codedot
- which engine to execute: dot
if true
, neato
if false
outputFormat
- the output format to usecontext
- the current request contextIOException
- if writing the input or output files to the disk failsif the output should be a simple PNG image
public byte[] getDotImage(String content, boolean dot) throws IOException
content
- the dot source codedot
- which engine to execute: dot
if true
, neato
if false
IOException
- if writing the input or output files to the disk failspublic byte[] getDotImage(String content, String extension, boolean dot) throws IOException
content
- the dot source codeextension
- the output file extensiondot
- which engine to execute: dot
if true
, neato
if false
IOException
- if writing the input or output files to the disk failspublic String writeDotImage(String content, boolean dot) throws IOException
outputDotImageFromFile(String, XWikiContext)
.content
- the dot source codedot
- which engine to execute: dot
if true
, neato
if false
IOException
- if writing the input or output files to the disk failspublic String writeDotImage(String content, String extension, boolean dot) throws IOException
outputDotImageFromFile(String, XWikiContext)
.content
- the dot source codeextension
- the output file extensiondot
- which engine to execute: dot
if true
, neato
if false
IOException
- if writing the input or output files to the disk failspublic void outputDotImage(String content, boolean dot, XWikiContext context) throws IOException
content
- the dot source codedot
- which engine to execute: dot
if true
, neato
if false
context
- the current request contextIOException
- if writing the input or output files to the disk fails, or if writing the response body failspublic void outputDotImage(String content, String extension, boolean dot, XWikiContext context) throws IOException
content
- the dot source codeextension
- the output file extensiondot
- which engine to execute: dot
if true
, neato
if false
context
- the current request contextIOException
- if writing the input or output files to the disk fails, or if writing the response body failspublic void outputDotImageFromFile(String filename, XWikiContext context) throws IOException
filename
- the name of the temporary file, previously returned by
writeDotImage(String, String, boolean)
context
- the current request contextIOException
- if reading the file from the disk fails, or if writing the response body failsCopyright © 2004–2014 XWiki. All rights reserved.