com.xpn.xwiki.plugin.image
Class ImagePlugin
java.lang.Object
com.xpn.xwiki.plugin.XWikiDefaultPlugin
com.xpn.xwiki.plugin.image.ImagePlugin
- All Implemented Interfaces:
- XWikiPluginInterface
public class ImagePlugin
- extends XWikiDefaultPlugin
Method Summary |
private void |
createThumbnail(int thumbnailWidth,
int thumbnailHeight,
java.awt.Image imgOri,
XWikiAttachment attachment)
|
XWikiAttachment |
downloadAttachment(XWikiAttachment attachment,
XWikiContext context)
|
void |
flushCache()
|
XWikiAttachment |
getImage(XWikiAttachment attachment,
int thumbnailWidth,
int thumbnailHeight,
XWikiContext context)
|
private java.awt.Image |
getImage(XWikiAttachment attachment,
XWikiContext context)
|
XWikiAttachment |
getImageByHeight(XWikiAttachment attachment,
int thumbnailHeight,
XWikiContext context)
|
XWikiAttachment |
getImageByWidth(XWikiAttachment attachment,
int thumbnailWidth,
XWikiContext context)
|
java.lang.String |
getName()
Allow to get the plugin name |
static int |
getType(java.lang.String mimeType)
|
void |
init(XWikiContext context)
|
Methods inherited from class com.xpn.xwiki.plugin.XWikiDefaultPlugin |
beginRendering, commonTagsHandler, endRendering, endRenderingHandler, getClassName, getPluginApi, insidePREHandler, outsidePREHandler, setClassName, setName, startRenderingHandler, virtualInit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
private static final org.apache.commons.logging.Log log
TYPE_JPG
private static final int TYPE_JPG
- See Also:
- Constant Field Values
TYPE_PNG
private static final int TYPE_PNG
- See Also:
- Constant Field Values
TYPE_BMP
private static final int TYPE_BMP
- See Also:
- Constant Field Values
name
private static java.lang.String name
imageCache
private XWikiCache imageCache
capacity
private int capacity
ImagePlugin
public ImagePlugin(java.lang.String name,
java.lang.String className,
XWikiContext context)
getName
public java.lang.String getName()
- Allow to get the plugin name
- Specified by:
getName
in interface XWikiPluginInterface
- Overrides:
getName
in class XWikiDefaultPlugin
- Returns:
- plugin name
init
public void init(XWikiContext context)
- Specified by:
init
in interface XWikiPluginInterface
- Overrides:
init
in class XWikiDefaultPlugin
flushCache
public void flushCache()
- Specified by:
flushCache
in interface XWikiPluginInterface
- Overrides:
flushCache
in class XWikiDefaultPlugin
downloadAttachment
public XWikiAttachment downloadAttachment(XWikiAttachment attachment,
XWikiContext context)
- Specified by:
downloadAttachment
in interface XWikiPluginInterface
- Overrides:
downloadAttachment
in class XWikiDefaultPlugin
getImageByHeight
public XWikiAttachment getImageByHeight(XWikiAttachment attachment,
int thumbnailHeight,
XWikiContext context)
throws java.lang.Exception
- Throws:
java.lang.Exception
getImage
public XWikiAttachment getImage(XWikiAttachment attachment,
int thumbnailWidth,
int thumbnailHeight,
XWikiContext context)
throws java.lang.Exception
- Throws:
java.lang.Exception
getImage
private java.awt.Image getImage(XWikiAttachment attachment,
XWikiContext context)
throws XWikiException,
java.lang.InterruptedException
- Throws:
XWikiException
java.lang.InterruptedException
getImageByWidth
public XWikiAttachment getImageByWidth(XWikiAttachment attachment,
int thumbnailWidth,
XWikiContext context)
throws java.lang.Exception
- Throws:
java.lang.Exception
createThumbnail
private void createThumbnail(int thumbnailWidth,
int thumbnailHeight,
java.awt.Image imgOri,
XWikiAttachment attachment)
throws java.io.IOException
- Throws:
java.io.IOException
getType
public static int getType(java.lang.String mimeType)
Copyright 2003 Ludovic Dubost