|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.plugin.XWikiDefaultPlugin
com.xpn.xwiki.plugin.image.ImagePlugin
@Deprecated public class ImagePlugin
Constructor Summary | |
---|---|
ImagePlugin(String name,
String className,
XWikiContext context)
Deprecated. Creates a new instance of this plugin. |
Method Summary | |
---|---|
XWikiAttachment |
downloadAttachment(XWikiAttachment attachment,
XWikiContext context)
Deprecated. Plugin extension point allowing the plugin to perform modifications to an attachment when the user opens a document attachment. |
void |
flushCache()
Deprecated. Older equivalent of the XWikiDefaultPlugin.flushCache(XWikiContext) method without a context provided. |
int |
getHeight(XWikiAttachment attachment,
XWikiContext context)
Deprecated. |
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. |
int |
getWidth(XWikiAttachment attachment,
XWikiContext context)
Deprecated. |
void |
init(XWikiContext context)
Deprecated. Global initialization, called when the platform is started and the plugin list is initialized. |
Methods inherited from class com.xpn.xwiki.plugin.XWikiDefaultPlugin |
---|
beginParsing, beginRendering, commonTagsHandler, 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 |
---|
public ImagePlugin(String name, String className, XWikiContext context)
name
- the name of the pluginclassName
- the class namecontext
- the XWiki contextXWikiDefaultPlugin.XWikiDefaultPlugin(String,String,com.xpn.xwiki.XWikiContext)
Method Detail |
---|
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 context
null
if the plugin doesn't want to expose a public APIpublic String getName()
XWikiPluginInterface
XWiki.getPlugin(String, XWikiContext)
.
getName
in interface XWikiPluginInterface
getName
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 void flushCache()
XWikiDefaultPlugin
XWikiDefaultPlugin.flushCache(XWikiContext)
method without a context provided.
flushCache
in class XWikiDefaultPlugin
public XWikiAttachment downloadAttachment(XWikiAttachment attachment, XWikiContext context)
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
and height
parameters. If only one of the
dimensions is specified, then the other one is computed to preserve the original aspect ratio of the image.
downloadAttachment
in interface XWikiPluginInterface
downloadAttachment
in class XWikiDefaultPlugin
attachment
- the original attachmentcontext
- the current request context
XWikiDefaultPlugin.downloadAttachment(XWikiAttachment, XWikiContext)
public int getWidth(XWikiAttachment attachment, XWikiContext context) throws IOException, XWikiException
attachment
- an image attachmentcontext
- the XWiki context
IOException
- if reading the image from the attachment content fails
XWikiException
- if reading the attachment content failspublic int getHeight(XWikiAttachment attachment, XWikiContext context) throws IOException, XWikiException
attachment
- an image attachmentcontext
- the XWiki context
IOException
- if reading the image from the attachment content fails
XWikiException
- if reading the attachment content fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |