org.xwiki.skinx
Interface SkinExtension


@ComponentRole
public interface SkinExtension

Allows a component to use a skin file (js or css), in the current page being rendered.

Since:
3.0M1
Version:
$Id$

Method Summary
 void use(String resource)
          Mark a resource as used in the current result.
 void use(String resource, Map<String,Object> parameters)
          Mark a skin extension document as used in the current result, together with some parameters.
 

Method Detail

use

void use(String resource)
Mark a resource as used in the current result. A resource is registered only once per request, further calls will not result in additional links, even if it is pulled with different parameters.

Parameters:
resource - The name of the resource to pull.

use

void use(String resource,
         Map<String,Object> parameters)
Mark a skin extension document as used in the current result, together with some parameters. How the parameters are used, depends on the type of resource being pulled. For example, JS and CSS extensions use the parameters in the resulting URL, while Link extensions use the parameters as attributes of the link tag. A resource is registered only once per request, further calls will not result in additional links, even if it is pulled with different parameters. If more than one calls per request are made, the parameters used are the ones from the last call (or none, if the last call did not specify any parameters).
TODO: document here the parameters that can be used and their meaning.

Parameters:
resource - The name of the resource to pull.
parameters - The parameters for this resource.


Copyright © 2004-2011 XWiki. All Rights Reserved.