com.xpn.xwiki.plugin.svg
Class SVGPlugin
java.lang.Object
com.xpn.xwiki.plugin.XWikiDefaultPlugin
com.xpn.xwiki.plugin.svg.SVGPlugin
- All Implemented Interfaces:
- XWikiPluginInterface
public class SVGPlugin
- extends XWikiDefaultPlugin
- implements XWikiPluginInterface
Field Summary |
private static org.apache.commons.logging.Log |
mLogger
|
private java.io.File |
tempDir
|
Method Summary |
protected java.lang.String[] |
expandSources(java.util.Vector sources)
|
void |
flushCache()
|
java.lang.String |
getName()
|
Api |
getPluginApi(XWikiPluginInterface plugin,
XWikiContext context)
|
byte[] |
getSVGImage(int hashCode,
java.lang.String content,
java.lang.String extension,
int height,
int width)
|
byte[] |
getSVGImage(java.lang.String content,
int height,
int width)
|
byte[] |
getSVGImage(java.lang.String content,
java.lang.String extension,
int height,
int width)
|
java.lang.String |
getSVGImageURL(java.lang.String content,
int height,
int width,
XWikiContext context)
|
java.io.File |
getTempFile(int hashcode,
java.lang.String extension)
|
java.io.File |
getTempFile(java.lang.String filename)
|
void |
init(XWikiContext context)
|
void |
outputSVGImage(java.lang.String content,
int height,
int width,
XWikiContext context)
|
void |
outputSVGImage(java.lang.String content,
java.lang.String extension,
int height,
int width,
XWikiContext context)
|
void |
outputSVGImageFromFile(java.lang.String filename,
XWikiContext context)
|
byte[] |
readSVGImage(java.io.File ofile)
|
java.lang.String |
writeSVGImage(java.lang.String content,
int height,
int width)
|
java.lang.String |
writeSVGImage(java.lang.String content,
java.lang.String extension,
int height,
int width)
|
Methods inherited from class com.xpn.xwiki.plugin.XWikiDefaultPlugin |
beginRendering, commonTagsHandler, downloadAttachment, endRendering, endRenderingHandler, 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 |
Methods inherited from interface com.xpn.xwiki.plugin.XWikiPluginInterface |
beginRendering, commonTagsHandler, downloadAttachment, endRendering, endRenderingHandler, getClassName, insidePREHandler, outsidePREHandler, setClassName, setName, startRenderingHandler, virtualInit |
mLogger
private static org.apache.commons.logging.Log mLogger
tempDir
private java.io.File tempDir
SVGPlugin
public SVGPlugin(java.lang.String name,
java.lang.String className,
XWikiContext context)
getName
public java.lang.String getName()
- Specified by:
getName
in interface XWikiPluginInterface
- Overrides:
getName
in class XWikiDefaultPlugin
getPluginApi
public Api getPluginApi(XWikiPluginInterface plugin,
XWikiContext context)
- Specified by:
getPluginApi
in interface XWikiPluginInterface
- Overrides:
getPluginApi
in class XWikiDefaultPlugin
flushCache
public void flushCache()
- Specified by:
flushCache
in interface XWikiPluginInterface
- Overrides:
flushCache
in class XWikiDefaultPlugin
init
public void init(XWikiContext context)
- Specified by:
init
in interface XWikiPluginInterface
- Overrides:
init
in class XWikiDefaultPlugin
getSVGImage
public byte[] getSVGImage(java.lang.String content,
int height,
int width)
throws java.io.IOException,
org.apache.batik.apps.rasterizer.SVGConverterException
- Throws:
java.io.IOException
org.apache.batik.apps.rasterizer.SVGConverterException
getSVGImage
public byte[] getSVGImage(java.lang.String content,
java.lang.String extension,
int height,
int width)
throws java.io.IOException,
org.apache.batik.apps.rasterizer.SVGConverterException
- Throws:
java.io.IOException
org.apache.batik.apps.rasterizer.SVGConverterException
getSVGImage
public byte[] getSVGImage(int hashCode,
java.lang.String content,
java.lang.String extension,
int height,
int width)
throws java.io.IOException,
org.apache.batik.apps.rasterizer.SVGConverterException
- Throws:
java.io.IOException
org.apache.batik.apps.rasterizer.SVGConverterException
expandSources
protected java.lang.String[] expandSources(java.util.Vector sources)
readSVGImage
public byte[] readSVGImage(java.io.File ofile)
throws java.io.FileNotFoundException,
java.io.IOException
- Throws:
java.io.FileNotFoundException
java.io.IOException
writeSVGImage
public java.lang.String writeSVGImage(java.lang.String content,
int height,
int width)
throws java.io.IOException,
org.apache.batik.apps.rasterizer.SVGConverterException
- Throws:
java.io.IOException
org.apache.batik.apps.rasterizer.SVGConverterException
writeSVGImage
public java.lang.String writeSVGImage(java.lang.String content,
java.lang.String extension,
int height,
int width)
throws java.io.IOException,
org.apache.batik.apps.rasterizer.SVGConverterException
- Throws:
java.io.IOException
org.apache.batik.apps.rasterizer.SVGConverterException
outputSVGImage
public void outputSVGImage(java.lang.String content,
int height,
int width,
XWikiContext context)
throws java.io.IOException,
org.apache.batik.apps.rasterizer.SVGConverterException
- Throws:
java.io.IOException
org.apache.batik.apps.rasterizer.SVGConverterException
outputSVGImage
public void outputSVGImage(java.lang.String content,
java.lang.String extension,
int height,
int width,
XWikiContext context)
throws java.io.IOException,
org.apache.batik.apps.rasterizer.SVGConverterException
- Throws:
java.io.IOException
org.apache.batik.apps.rasterizer.SVGConverterException
outputSVGImageFromFile
public void outputSVGImageFromFile(java.lang.String filename,
XWikiContext context)
throws java.io.IOException
- Throws:
java.io.IOException
getTempFile
public java.io.File getTempFile(java.lang.String filename)
getTempFile
public java.io.File getTempFile(int hashcode,
java.lang.String extension)
getSVGImageURL
public java.lang.String getSVGImageURL(java.lang.String content,
int height,
int width,
XWikiContext context)
throws java.io.IOException,
org.apache.batik.apps.rasterizer.SVGConverterException
- Throws:
java.io.IOException
org.apache.batik.apps.rasterizer.SVGConverterException
Copyright 2003 Ludovic Dubost