com.xpn.xwiki.plugin.skinx
Class CssResourceSkinExtensionPlugin

java.lang.Object
  extended by com.xpn.xwiki.plugin.XWikiDefaultPlugin
      extended by com.xpn.xwiki.plugin.skinx.AbstractSkinExtensionPlugin
          extended by com.xpn.xwiki.plugin.skinx.AbstractResourceSkinExtensionPlugin
              extended by com.xpn.xwiki.plugin.skinx.CssResourceSkinExtensionPlugin
All Implemented Interfaces:
com.xpn.xwiki.plugin.XWikiPluginInterface

public class CssResourceSkinExtensionPlugin
extends AbstractResourceSkinExtensionPlugin

Skin Extension plugin to use css files from JAR resources.

Since:
1.3
Version:
$Id$

Field Summary
 
Fields inherited from class com.xpn.xwiki.plugin.skinx.AbstractSkinExtensionPlugin
contextKey, parametersContextKey
 
Constructor Summary
CssResourceSkinExtensionPlugin(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 generateLink(String url, String resourceName, com.xpn.xwiki.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
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, 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

CssResourceSkinExtensionPlugin

public CssResourceSkinExtensionPlugin(String name,
                                      String className,
                                      com.xpn.xwiki.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.XWikiDefaultPlugin(String,String,com.xpn.xwiki.XWikiContext)
Method Detail

getName

public String getName()
Specified by:
getName in interface com.xpn.xwiki.plugin.XWikiPluginInterface
Overrides:
getName in class com.xpn.xwiki.plugin.XWikiDefaultPlugin

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 class AbstractResourceSkinExtensionPlugin
Returns:
String Action name.

generateLink

protected String generateLink(String url,
                              String resourceName,
                              com.xpn.xwiki.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 class AbstractResourceSkinExtensionPlugin
Parameters:
url - String representation of the url to load (eg: /res/url.js)
resourceName - name of the pulled resource
context - the current request context
Returns:
HTML code linking to the pulled resource (eg: <script type="text/javascript" src="/res/url.js"/>)

endParsing

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.

Specified by:
endParsing in interface com.xpn.xwiki.plugin.XWikiPluginInterface
Overrides:
endParsing in class AbstractSkinExtensionPlugin
See Also:
AbstractSkinExtensionPlugin.endParsing(String, XWikiContext)


Copyright © 2004-2012 XWiki. All Rights Reserved.