|
||||||||||
| 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.LinkExtensionPlugin
public class LinkExtensionPlugin
Skin eXtension that allows inserting generic links in the <head> section of the resulting XHTML. Unlike JavaScript or StyleSheet extensions, Link extensions don't pull XDocuments as scripting or styling resources for the current document, but register additional related resources. Examples include:
| Field Summary |
|---|
| Fields inherited from class com.xpn.xwiki.plugin.skinx.AbstractSkinExtensionPlugin |
|---|
contextKey, parametersContextKey |
| Constructor Summary | |
|---|---|
LinkExtensionPlugin(String name,
String className,
com.xpn.xwiki.XWikiContext context)
XWiki plugin constructor. |
|
| Method Summary | |
|---|---|
String |
endParsing(String content,
com.xpn.xwiki.XWikiContext context)
|
Set<String> |
getAlwaysUsedExtensions(com.xpn.xwiki.XWikiContext context)
Returns the list of always used extensions of this type. |
String |
getLink(String link,
com.xpn.xwiki.XWikiContext context)
Abstract method for obtaining a link that points to the actual pulled resource. |
boolean |
hasPageExtensions(com.xpn.xwiki.XWikiContext context)
Determines if the requested document contains on page skin extension objects of this type. |
| 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, init, 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 LinkExtensionPlugin(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 String getLink(String link,
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 AbstractSkinExtensionPluginlink - 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.public Set<String> getAlwaysUsedExtensions(com.xpn.xwiki.XWikiContext context)
There is no support for always used link extensions yet.
getAlwaysUsedExtensions in class AbstractSkinExtensionPlugincontext - The current request context.
AbstractSkinExtensionPlugin.getAlwaysUsedExtensions(XWikiContext)public boolean hasPageExtensions(com.xpn.xwiki.XWikiContext context)
Not supported for link extensions.
hasPageExtensions in class AbstractSkinExtensionPlugincontext - the current request context
AbstractSkinExtensionPlugin.hasPageExtensions(com.xpn.xwiki.XWikiContext)
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.
endParsing in interface com.xpn.xwiki.plugin.XWikiPluginInterfaceendParsing in class AbstractSkinExtensionPluginAbstractSkinExtensionPlugin.endParsing(String, XWikiContext)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||