Class SkinExtensionPluginApi

    • Method Detail

      • use

        public 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.
        See Also:
        AbstractSkinExtensionPlugin.use(String, XWikiContext)
      • use

        public 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).
        Parameters:
        resource - The name of the resource to pull.
        parameters - The parameters for this resource.
        See Also:
        AbstractSkinExtensionPlugin.use(String, Map, XWikiContext)
      • getImportString

        public String getImportString()
        Composes and returns the links to the resources pulled in the current request. This method is called at the end of each request, once for each type of resource (subclass), and the result is placed in the generated XHTML.
        Returns:
        a XHMTL fragment with all extensions imports statements for this request. This includes both extensions that are defined as being "used always" and "on demand" extensions explicitly requested for this page. Always used extensions are always, before on demand extensions, so that on demand extensions can override more general elements in the always used ones.