Plugin XML Reference

Plugin XML Reference

This reference describes the elements and attributes that make up a plugin's configuration XML file.

<plugin>
    <!-- The following in any order. -->
    <class>
    <name>
    <description>
    <author>
    <authorURL>
    <pluginURL>
    <version>
    <minServerVersion>
    <maxServerVersion>
    <databaseKey>
    <databaseVersion>
    <components>
    <css>
    <javascript>
    <soy>
    <widget>
    <macro>
    <urlmapping>
    <sitemesh>
</plugin>

<author> Element

The name of the invidual or company that created this plugin.

<author>xs:string</author>
         

<authorURL> Element

URL location relating to the author, such as the author's web site.

<authorURL>xs:string</authorURL>

<class> Element

The name of the class that implements com.jivesoftware.base.plugin.Plugin for this plugin.

<class>xs:string</class>

<components> Element

Specifies user interface components added by this plugin. For more on the XML used here, see UI Components XML Reference.

<css> Element

Specifies a CSS stylesheet for use in the plugin.

<css
    src="xs:string" />

Attributes

src
A path to the CSS file based from the root of the src (i.e., /resources/plugin.css).

<databaseKey> Element

Key representing this plugin's database schema in the Jive SBS database. Used in the jiveVersion table to store schema version information. Only required if the plugin has a DB schema.

<databaseKey>xs:string</databaseKey>

<databaseVersion> Element

The version of the database schema supported by this version of the plugin. Increment this value to provoke schema updates when the plugin is upgraded. Only required if the plugin has a DB schema. Not supported in version 2.5.

<databaseVersion>xs:integer</databaseVersion>

<decorator> Element

Specify a custom SiteMesh decorator for the plugin.

<decorator
    name="xs:string"
    page="xs:string">
    <pattern>
</decorator>

Attributes

name
The name of the custom decorator; this must be unique.
page
The name of the custom decorator page; this must live under the plugin.

<defaults> Element

A set of default values for a macro parameter. Include more than one value when the set of possible values is known in advance.

<defaults>
    <value>xs:string</value>
</defaults>

<description> Element

A short description of this plugin.

<description>xs:string</description>

<excludes> Element

Specifies URL patterns that SiteMesh should not decorate.

<excludes>
    <pattern>
</excludes>

<javascript> Element

Used to define custom Javascript information from a plugin.

<javascript
    src="xs:string" />

Attributes

src
A path to the Javascript file based from the root of the src (i.e., /resources/plugin.js).

<soy> Element

Specifies a list of soy templates that will automatically be imported as client-side templates on every page. (Client-side Soy templates are converted into Javascript that needs to be imported into a page for the templates to be used).

<soy
    src="xs:string" />

Attributes

src
Comma-separated list of paths to the Soy files that should be automatically included.

<macro> Element

Describes a custom macro.

<macro
    name="xs:string"
    type="text | inline | image"
    url="xs:string"
    hasBody="xs:boolean"
    class="xs:string"
    script="xs:string"
    icon="xs:string"
    showInRTE="xs:boolean"
    isButton="xs:boolean"
    order="xs:integer">
    <parameterSet>
</macro>

Attributes

name
The macro's name as it should appear in the editor's Insert menu.
type
How this macro will display when it's published. Values include:
- text -- Displays text typed by the user (usually formatted by the macro).
- inline -- Displays
url
A URL where the macro can be found.
hasBody
true to specify that this macro
class
Fully-qualified name of the macro's Java class. The class must implement com.jivesoftware.base.plugin.Macro.
script
A macro script. The following languages are supported: - groovy - python - ruby - javascript - NetRexx - Tcl - XSLT
icon
The icon used in the content editor to visually represent the macro. The image will be loaded from the images directory of the plugin. The following image file formats are supported: gif, jpeg, jpg, png
showInRTE
true to enable this macro for use in the rich text editor.
isButton
true to render the macro as a button in the RTE toolbar instead of the insert button's menu.
order
The order in which this macro is processed when rendering the content. Higher numbers are rendered later. So a higher number is needed for a macro that relies on particular content already having been rendered.

<maxServerVersion> Element

The minimum version of the server that this plugin requires.

<maxServerVersion>xs:string</maxServerVersion>

<minServerVersion> Element

The minimum version of the server that this plugin requires.

<minServerVersion>xs:string</minServerVersion>

<name> Element

The name of this plugin as it should be displayed when viewed in the admin tool.

<name>xs:string</name>

<parameter> Element

Defines a macro parameter, along with default values, if any.

<parameter
    name="xs:string"
    value="xs:string">
    <defaults>
        <value>xs:string</value>
    </defaults>
</parameter>

Attributes

name
The parameter's name.
value
The parameter's value.

<parameterSet> Element

Defines a named macro parameter set. A parameter set provides an easy way to set several macro properties at once.

<parameterSet
    name="xs:string">
    <parameter>
</parameterSet>

Attributes

name
The parameter set's name as it should appear in the editor Insert menu.

<pattern> Element

A URL pattern used by either of the SiteMesh tag children: decorator or excludes. Examples of a pattern would be: - /foo* - *.bar

<pattern>xs:string</pattern>

<pluginURL> Element

URL of where the plugin lives.

<pluginURL>xs:string</pluginURL>

<sitemesh> Element

<sitemesh>
    <!-- The following in any order. -->
    <decorator>
    <excludes>
</sitemesh>

<urlmapping> Element

<urlmapping
    prefix="xs:string"
    class="xs:string" />

Attributes

prefix
The URL prefix to map actions to. An example would be /foo.
class
The class of the URL mapper.

<value> Element

Specifies a possible default value for a macro parameter.

<value>xs:string</value>

<version> Element

The version of this plugin.

<version>xs:string</version>

<widget> Element

Configuration for a custom widget.

<widget
    class="xs:string" />

Attributes

class
The widget's fully-qualified class name. The widget class must extend com.jivesoftware.community.widget.BaseWidget.