|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.plugin.XWikiDefaultPlugin
@Deprecated public class XWikiDefaultPlugin
Abstract base plugin implementation.
Constructor Summary | |
---|---|
XWikiDefaultPlugin(String name,
String className,
XWikiContext context)
Deprecated. The mandatory plugin constructor, this is the method called (through reflection) by the plugin manager. |
Method Summary | |
---|---|
void |
beginParsing(XWikiContext context)
Deprecated. Hook method called at the start of the response generation process, before the parsing of the root template begins. |
void |
beginRendering(XWikiContext context)
Deprecated. Hook method, called before the 1.0 rendering engine starts processing a wiki document, after XWikiPluginInterface.beginParsing(XWikiContext) and before XWikiPluginInterface.commonTagsHandler(String, XWikiContext) . |
String |
commonTagsHandler(String content,
XWikiContext context)
Deprecated. Hook method called during the 1.0 rendering process, after XWikiPluginInterface.beginRendering(XWikiContext) and right before
XWikiPluginInterface.startRenderingHandler(String, XWikiContext) . |
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. |
String |
endParsing(String content,
XWikiContext context)
Deprecated. Hook method called at the end of the response generation process, after the parsing of the root template is finished. |
void |
endRendering(XWikiContext context)
Deprecated. Hook method, called after the 1.0 rendering engine finished processing a wiki document. |
String |
endRenderingHandler(String content,
XWikiContext context)
Deprecated. Hook method called during the 1.0 rendering process, after XWikiPluginInterface.outsidePREHandler(String, XWikiContext) and
right before XWikiPluginInterface.endRendering(XWikiContext) . |
void |
flushCache()
Deprecated. use flushCache(XWikiContext) instead |
void |
flushCache(XWikiContext context)
Deprecated. A "flush cache" method usually called by the global XWiki.flushCache(XWikiContext) ,
requesting plugins to clear their cached data. |
String |
getClassName()
Deprecated. use getName() instead |
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. |
String |
insidePREHandler(String line,
XWikiContext context)
Deprecated. Hook method called during the 1.0 rendering process, once for each line of content inside pre blocks,
after XWikiPluginInterface.startRenderingHandler(String, XWikiContext) and before
XWikiPluginInterface.endRenderingHandler(String, XWikiContext) . |
String |
outsidePREHandler(String line,
XWikiContext context)
Deprecated. Hook method called during the 1.0 rendering process, once for each line of content outside pre blocks,
after XWikiPluginInterface.startRenderingHandler(String, XWikiContext) and before
XWikiPluginInterface.endRenderingHandler(String, XWikiContext) . |
void |
setClassName(String name)
Deprecated. most plugins hard code their names, so this doesn't really work, and changing the classname isn't really possible |
void |
setName(String name)
Deprecated. most plugins hard code their names, so this doesn't really work |
String |
startRenderingHandler(String content,
XWikiContext context)
Deprecated. Hook method called during the 1.0 rendering process, after XWikiPluginInterface.commonTagsHandler(String, XWikiContext) and
before XWikiPluginInterface.outsidePREHandler(String, XWikiContext) . |
void |
virtualInit(XWikiContext context)
Deprecated. Initialization method called each time a virtual wiki is started, allowing plugins to perform initialization tasks needed in each wiki. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XWikiDefaultPlugin(String name, String className, XWikiContext context)
name
- the plugin name, usually ignored, since plugins have a fixed nameclassName
- the name of this class, ignoredcontext
- the current request contextMethod Detail |
---|
public String getName()
XWikiPluginInterface
XWiki.getPlugin(String, XWikiContext)
.
getName
in interface XWikiPluginInterface
public Api getPluginApi(XWikiPluginInterface plugin, XWikiContext context)
XWikiPluginInterface
getPluginApi
in interface XWikiPluginInterface
plugin
- the plugin instance to wrapcontext
- the current request context
null
if the plugin doesn't want to expose a public APIpublic void init(XWikiContext context)
XWikiPluginInterface
init
in interface XWikiPluginInterface
context
- the current context, should not be stored since it will become mostly unreliable once the initial
request is terminatedpublic void virtualInit(XWikiContext context)
XWikiPluginInterface
virtualInit
in interface XWikiPluginInterface
context
- the current request contextpublic void flushCache(XWikiContext context)
XWikiPluginInterface
XWiki.flushCache(XWikiContext)
,
requesting plugins to clear their cached data. When this method is called, plugins should discard all the
information they hold from the wiki and re-read it if needed.
flushCache
in interface XWikiPluginInterface
context
- the current request context@Deprecated public void flushCache()
flushCache(XWikiContext)
instead
flushCache(XWikiContext)
method without a context provided.
public void beginParsing(XWikiContext context)
XWikiPluginInterface
beginParsing
in interface XWikiPluginInterface
context
- the current request contextthe pair method called at the end of the response generation process
public void beginRendering(XWikiContext context)
XWikiPluginInterface
XWikiPluginInterface.beginParsing(XWikiContext)
and before XWikiPluginInterface.commonTagsHandler(String, XWikiContext)
. This allows a
plugin to initialize its per-rendering variables, or to modify the (velocity) context. This method can be called
multiple times per request, once for each time the 1.0 rendering engine is invoked. At this point the content is
not yet processed by any of the rendering components.
beginRendering
in interface XWikiPluginInterface
context
- the current request contextthe pair method called at the end of the content processing
public String commonTagsHandler(String content, XWikiContext context)
XWikiPluginInterface
XWikiPluginInterface.beginRendering(XWikiContext)
and right before
XWikiPluginInterface.startRenderingHandler(String, XWikiContext)
. At this point the content has already been processed by all
of the important rendering components (Velocity, Radeox, Groovy). The content can be altered before returning,
and the rendering process will continue on the returned value.
commonTagsHandler
in interface XWikiPluginInterface
content
- the current content being rendered; already processed by Radeox, Velocity and Groovycontext
- the current request context
public String startRenderingHandler(String content, XWikiContext context)
XWikiPluginInterface
XWikiPluginInterface.commonTagsHandler(String, XWikiContext)
and
before XWikiPluginInterface.outsidePREHandler(String, XWikiContext)
. The content can be altered before returning. This method
should be avoided, since the place where the hook is used isn't actually reliable, since at this point the
rendering process is almost done.
startRenderingHandler
in interface XWikiPluginInterface
content
- the current content being rendered; already processed by Radeox, Velocity and Groovycontext
- the current request context
the pair method called after the content is processed
,
the method called before the content has been processed by the rendering
engine
public String outsidePREHandler(String line, XWikiContext context)
XWikiPluginInterface
pre
blocks,
after XWikiPluginInterface.startRenderingHandler(String, XWikiContext)
and before
XWikiPluginInterface.endRenderingHandler(String, XWikiContext)
. The content can be altered before returning.
outsidePREHandler
in interface XWikiPluginInterface
line
- the current line being rendered; already processed by Radeox, Velocity and Groovycontext
- the current request context
the pair method called for content inside {@code pre} blocks
public String insidePREHandler(String line, XWikiContext context)
XWikiPluginInterface
pre
blocks,
after XWikiPluginInterface.startRenderingHandler(String, XWikiContext)
and before
XWikiPluginInterface.endRenderingHandler(String, XWikiContext)
. The content can be altered before returning.
insidePREHandler
in interface XWikiPluginInterface
line
- the current line being rendered; already processed by Radeox, Velocity and Groovycontext
- the current request context
the pair method called for content outside {@code pre} blocks
public String endRenderingHandler(String content, XWikiContext context)
XWikiPluginInterface
XWikiPluginInterface.outsidePREHandler(String, XWikiContext)
and
right before XWikiPluginInterface.endRendering(XWikiContext)
. The content can be altered before returning, and the returned
value is the one coming out of the rendering process.
endRenderingHandler
in interface XWikiPluginInterface
content
- the current content being rendered; already processed by Radeox, Velocity and Groovycontext
- the current request context
the pair method called before the content is processed
,
the method called after the full rendering process is finished
public void endRendering(XWikiContext context)
XWikiPluginInterface
endRendering
in interface XWikiPluginInterface
context
- the current request contextallows to also alter the rendering result
public String endParsing(String content, XWikiContext context)
XWikiPluginInterface
endParsing
in interface XWikiPluginInterface
content
- the full response to send to the clientcontext
- the current request context
the pair method called at the start of the response generation process
public XWikiAttachment downloadAttachment(XWikiAttachment attachment, XWikiContext context)
XWikiPluginInterface
downloadAttachment
in interface XWikiPluginInterface
attachment
- the original attachmentcontext
- the current request context
@Deprecated public void setName(String name)
name
- the new name of the plugin@Deprecated public String getClassName()
getName()
instead
@Deprecated public void setClassName(String name)
name
- the new name of the plugin
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |