Package com.xpn.xwiki.plugin.skinx
Class CssResourceSkinExtensionPlugin
- java.lang.Object
-
- com.xpn.xwiki.plugin.XWikiDefaultPlugin
-
- com.xpn.xwiki.plugin.skinx.AbstractSkinExtensionPlugin
-
- com.xpn.xwiki.plugin.skinx.AbstractResourceSkinExtensionPlugin
-
- com.xpn.xwiki.plugin.skinx.CssResourceSkinExtensionPlugin
-
- All Implemented Interfaces:
com.xpn.xwiki.internal.cache.rendering.RenderingCacheAware
,XWikiPluginInterface
public class CssResourceSkinExtensionPlugin extends AbstractResourceSkinExtensionPlugin
Skin Extension plugin to use css files from JAR resources.- Since:
- 1.3
- Version:
- $Id: 2fbcbba7dcdda2e980b0dd2c7b3e7a66bebd1f12 $
-
-
Field Summary
-
Fields inherited from class com.xpn.xwiki.plugin.skinx.AbstractSkinExtensionPlugin
contextKey, DEFER_DEFAULT_PARAM, parametersContextKey, QUERY_PARAMETER_DELIMITER
-
-
Constructor Summary
Constructors Constructor Description CssResourceSkinExtensionPlugin(String name, String className, XWikiContext context)
XWiki plugin constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
endParsing(String content, XWikiContext context)
protected String
generateLink(String url, String resourceName, XWikiContext context)
Takes a URL string and outputs a link which will cause the browser to load the url.protected String
getAction()
Get the action which the url should specify for calling this resource.String
getName()
-
Methods inherited from class com.xpn.xwiki.plugin.skinx.AbstractResourceSkinExtensionPlugin
getAlwaysUsedExtensions, getLink, hasPageExtensions
-
Methods inherited from class com.xpn.xwiki.plugin.skinx.AbstractSkinExtensionPlugin
getCacheResources, getCurrentDocumentReferenceResolver, getDefaultEntityReferenceSerializer, getImportString, getLink, getParameter, getParametersForResource, getParametersMap, getPluginApi, getPulledResources, getSkinExtensionAsync, initializeRequestListIfNeeded, parametersAsQueryString, restoreCacheResources, sanitize, use, use
-
Methods inherited from class com.xpn.xwiki.plugin.XWikiDefaultPlugin
beginParsing, beginRendering, commonTagsHandler, downloadAttachment, endRendering, endRenderingHandler, flushCache, flushCache, getClassName, getLocalization, init, insidePREHandler, localizePlainOrKey, outsidePREHandler, setClassName, setName, startRenderingHandler, virtualInit
-
-
-
-
Constructor Detail
-
CssResourceSkinExtensionPlugin
public CssResourceSkinExtensionPlugin(String name, String className, XWikiContext context)
XWiki plugin constructor.- Parameters:
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.- See Also:
XWikiDefaultPlugin(String,String,com.xpn.xwiki.XWikiContext)
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getName
in interfaceXWikiPluginInterface
- Overrides:
getName
in classXWikiDefaultPlugin
-
getAction
protected String getAction()
Description copied from class:AbstractResourceSkinExtensionPlugin
Get the action which the url should specify for calling this resource.- Specified by:
getAction
in classAbstractResourceSkinExtensionPlugin
- Returns:
- String Action name.
-
generateLink
protected String generateLink(String url, String resourceName, XWikiContext context)
Description copied from class:AbstractResourceSkinExtensionPlugin
Takes a URL string and outputs a link which will cause the browser to load the url.- Specified by:
generateLink
in classAbstractResourceSkinExtensionPlugin
- Parameters:
url
- String representation of the url to load (eg:/res/url.js
)resourceName
- name of the pulled resourcecontext
- the current request context- Returns:
- HTML code linking to the pulled resource (eg:
<script src="/res/url.js"/>
)
-
endParsing
public String endParsing(String content, 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.
- Specified by:
endParsing
in interfaceXWikiPluginInterface
- Overrides:
endParsing
in classAbstractSkinExtensionPlugin
- See Also:
AbstractSkinExtensionPlugin.endParsing(String, XWikiContext)
-
-