|
||||||||||
| 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.skinx.AbstractSkinExtensionPlugin
com.xpn.xwiki.plugin.skinx.AbstractDocumentSkinExtensionPlugin
com.xpn.xwiki.plugin.skinx.JsSkinExtensionPlugin
public class JsSkinExtensionPlugin
Skin Extension plugin that allows pulling javascript code stored inside wiki documents as
XWiki.JavaScriptExtension objects.
| Field Summary | |
|---|---|
static String |
DEFER_DEFAULT_PARAM
The name of the preference (in the configuration file) specifying what is the default value of the defer, in case nothing is specified in the parameters of this extension. |
static String |
JSX_CLASS_NAME
The name of the XClass storing the code for this type of extensions. |
static String |
PLUGIN_NAME
The identifier for this plugin; used for accessing the plugin from velocity, and as the action returning the extension content. |
| Fields inherited from class com.xpn.xwiki.plugin.skinx.AbstractSkinExtensionPlugin |
|---|
contextKey, parametersContextKey |
| Constructor Summary | |
|---|---|
JsSkinExtensionPlugin(String name,
String className,
com.xpn.xwiki.XWikiContext context)
XWiki plugin constructor. |
|
| Method Summary | |
|---|---|
String |
endParsing(String content,
com.xpn.xwiki.XWikiContext context)
|
protected String |
getExtensionClassName()
The name of the XClass which holds extensions of this type. |
protected String |
getExtensionName()
A user-friendly name for this type of resource, used in the auto-generated class document. |
String |
getLink(String documentName,
com.xpn.xwiki.XWikiContext context)
Abstract method for obtaining a link that points to the actual pulled resource. |
void |
virtualInit(com.xpn.xwiki.XWikiContext context)
|
| Methods inherited from class com.xpn.xwiki.plugin.skinx.AbstractDocumentSkinExtensionPlugin |
|---|
getAlwaysUsedExtensions, getEvents, getExtensionClass, hasPageExtensions, init, onEvent |
| Methods inherited from class com.xpn.xwiki.plugin.skinx.AbstractSkinExtensionPlugin |
|---|
getImportString, getParameter, getParametersForResource, getParametersMap, getPluginApi, getPulledResources, initializeRequestListIfNeeded, parametersAsQueryString, sanitize, use, use |
| Methods inherited from class com.xpn.xwiki.plugin.XWikiDefaultPlugin |
|---|
beginParsing, beginRendering, commonTagsHandler, downloadAttachment, endRendering, endRenderingHandler, flushCache, flushCache, getClassName, getName, insidePREHandler, outsidePREHandler, setClassName, setName, startRenderingHandler |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xwiki.observation.EventListener |
|---|
getName |
| Field Detail |
|---|
public static final String JSX_CLASS_NAME
public static final String PLUGIN_NAME
public static final String DEFER_DEFAULT_PARAM
| Constructor Detail |
|---|
public JsSkinExtensionPlugin(String name,
String className,
com.xpn.xwiki.XWikiContext context)
name - The name of the plugin, which can be used for retrieving the plugin API from velocity. Unused.className - The canonical classname of the plugin. Unused.context - The current request context.XWikiDefaultPlugin.XWikiDefaultPlugin(String,String,com.xpn.xwiki.XWikiContext)| Method Detail |
|---|
public void virtualInit(com.xpn.xwiki.XWikiContext context)
Create/update the XClass corresponding to this kind of extension in this virtual wiki.
We must override this method since the plugin manager only calls it for classes that provide their own implementation, and not an inherited one.
virtualInit in interface com.xpn.xwiki.plugin.XWikiPluginInterfacevirtualInit in class AbstractDocumentSkinExtensionPluginXWikiPluginInterface.virtualInit(com.xpn.xwiki.XWikiContext)
public String getLink(String documentName,
com.xpn.xwiki.XWikiContext context)
AbstractSkinExtensionPlugin<script src="/path/to/Document">, while CSS
uses <link rel="stylesheet" href="/path/to/Document"> (the actual syntax is longer, this is
just a simplified example).
getLink in class AbstractSkinExtensionPlugindocumentName - the name of the wiki document holding the resource.context - the current request context, needed to access the URLFactory.
String representation of the linking element that should be printed in the generated HTML.protected String getExtensionClassName()
AbstractDocumentSkinExtensionPlugin
getExtensionClassName in class AbstractDocumentSkinExtensionPluginString representation of the XClass name, in the Space.Document format.protected String getExtensionName()
AbstractDocumentSkinExtensionPlugin
getExtensionName in class AbstractDocumentSkinExtensionPlugin
public String endParsing(String content,
com.xpn.xwiki.XWikiContext context)
At the end of the request, insert the links to the pulled resources in the response, in the place marked by an XML comment of the format <!-- canonical.plugin.classname -->.
We must override this method since the plugin manager only calls it for classes that provide their own implementation, and not an inherited one.
We must override this method since the plugin manager only calls it for classes that provide their own implementation, and not an inherited one.
endParsing in interface com.xpn.xwiki.plugin.XWikiPluginInterfaceendParsing in class AbstractDocumentSkinExtensionPluginAbstractSkinExtensionPlugin.endParsing(String, XWikiContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||