Package 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
@Deprecated public class ImagePlugin extends XWikiDefaultPlugin
Deprecated.the plugin technology is deprecated, consider rewriting as components- Version:
- $Id: bc09665a1fada2994f10715482a863ec39cabe36 $
-
-
Constructor Summary
Constructors Constructor Description ImagePlugin(String name, String className, XWikiContext context)
Deprecated.Creates a new instance of this plugin.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description XWikiAttachment
downloadAttachment(XWikiAttachment attachment, XWikiContext context)
Deprecated.void
flushCache()
Deprecated.int
getHeight(XWikiAttachment attachment, XWikiContext context)
Deprecated.String
getName()
Deprecated.Api
getPluginApi(XWikiPluginInterface plugin, XWikiContext context)
Deprecated.int
getWidth(XWikiAttachment attachment, XWikiContext context)
Deprecated.void
init(XWikiContext context)
Deprecated.-
Methods inherited from class com.xpn.xwiki.plugin.XWikiDefaultPlugin
beginParsing, beginRendering, commonTagsHandler, endParsing, endRendering, endRenderingHandler, flushCache, getClassName, getLocalization, insidePREHandler, localizePlainOrKey, outsidePREHandler, setClassName, setName, startRenderingHandler, virtualInit
-
-
-
-
Constructor Detail
-
ImagePlugin
public ImagePlugin(String name, String className, XWikiContext context)
Deprecated.Creates a new instance of this plugin.- Parameters:
name
- the name of the pluginclassName
- the class namecontext
- the XWiki context- See Also:
XWikiDefaultPlugin(String, String, com.xpn.xwiki.XWikiContext)
-
-
Method Detail
-
getPluginApi
public Api getPluginApi(XWikiPluginInterface plugin, XWikiContext context)
Deprecated.- Specified by:
getPluginApi
in interfaceXWikiPluginInterface
- Overrides:
getPluginApi
in classXWikiDefaultPlugin
-
getName
public String getName()
Deprecated.- Specified by:
getName
in interfaceXWikiPluginInterface
- Overrides:
getName
in classXWikiDefaultPlugin
-
init
public void init(XWikiContext context)
Deprecated.- Specified by:
init
in interfaceXWikiPluginInterface
- Overrides:
init
in classXWikiDefaultPlugin
-
flushCache
public void flushCache()
Deprecated.- Overrides:
flushCache
in classXWikiDefaultPlugin
-
downloadAttachment
public XWikiAttachment downloadAttachment(XWikiAttachment attachment, XWikiContext context)
Deprecated.Allows to scale images server-side, in order to have real thumbnails for reduced traffic. The new image dimensions are passed in the request as the
width
andheight
parameters. If only one of the dimensions is specified, then the other one is computed to preserve the original aspect ratio of the image.- Specified by:
downloadAttachment
in interfaceXWikiPluginInterface
- Overrides:
downloadAttachment
in classXWikiDefaultPlugin
- See Also:
XWikiDefaultPlugin.downloadAttachment(XWikiAttachment, XWikiContext)
-
getWidth
public int getWidth(XWikiAttachment attachment, XWikiContext context) throws IOException, XWikiException
Deprecated.- Parameters:
attachment
- an image attachmentcontext
- the XWiki context- Returns:
- the width of the specified image
- Throws:
IOException
- if reading the image from the attachment content failsXWikiException
- if reading the attachment content fails
-
getHeight
public int getHeight(XWikiAttachment attachment, XWikiContext context) throws IOException, XWikiException
Deprecated.- Parameters:
attachment
- an image attachmentcontext
- the XWiki context- Returns:
- the height of the specified image
- Throws:
IOException
- if reading the image from the attachment content failsXWikiException
- if reading the attachment content fails
-
-