Commit c2df92e4 authored by Bill Lynch's avatar Bill Lynch Committed by bill

Plugin docs work (not 100% done yet)


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@507 b35dd754-fafc-0310-a699-88a17e54d16e
parent 7962a722
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Messenger: Overview - Jive Software</title>
<link type="text/css" rel="stylesheet" href="style.css">
</head>
<body>
<h1>Jive Messenger</h1>
<p> Jive Messenger provides comprehensive group chat and instant
<h1>Jive Messenger @version@</h1>
<p>
Jive Messenger provides comprehensive group chat and instant
messaging (IM) services to online and intranet user communities using
the XMPP protocol.</p>
the XMPP protocol.
</p>
<p>As a pure Java application, the server is designed for
<p>
As a pure Java application, the server is designed for
extensible and flexible deployment into new or existing infrastructure.
The server contains a pluggable backend data storage and security system and
interfaces for customizing and extending the server.</p>
interfaces for customizing and extending the server.
</p>
<b>Documentation:</b>
<p><b>Environment:</b></p>
<ul>
<li> <a href="install-guide.html">Installation Guide</a> -
How to install Jive Messenger as a standalone application or into
an existing application server.</li>
<li> <a href="database.html">Database Installation Guide</a> - How
to setup your database for use with Jive Messenger.</li>
<li> <a href="database-guide.html">Database Schema Guide</a> - A
tour of the Jive Messenger database schema for developers and database
administrators.</li>
<li> <a href="ssl-guide.html">SSL Guide</a> - A guide to setting up
Messenger's SSL secure socket support.</li>
<li> <a href="ldap-guide.html">LDAP Guide</a> - A guide to setting
up Jive Messenger to work with LDAP user stores.</li>
<li>Requires JDK 1.5</li>
<li>Database (optional -- includes an all-Java embedded database)</li>
</ul>
<p><b>Documentation:</b></p>
<ul>
<li>
<a href="install-guide.html">Installation Guide</a> -
How to install Jive Messenger as a standalone application or into
an existing application server.
</li>
<li>
<a href="database.html">Database Installation Guide</a> -
How to setup your database for use with Jive Messenger.
</li>
<li>
<a href="database-guide.html">Database Schema Guide</a> -
A tour of the Jive Messenger database schema for developers and database administrators.
</li>
<li>
<a href="ssl-guide.html">SSL Guide</a> -
A guide to setting up Messenger's SSL secure socket support.
</li>
<li>
<a href="ldap-guide.html">LDAP Guide</a> -
A guide to setting up Jive Messenger to work with LDAP user stores.
</li>
<li>
<a href="plugin-dev-guide.html">Plugin Guide</a> -
A guide to writing and installing plugins for Jive Messenger.
</li>
<li>
<a href="javadoc/index.html">JavaDocs</a> -
Jive Messenger API documentation.
</li>
</ul>
<p>An active support community for Jive Messenger is available at <a
href="http://www.jivesoftware.org/forums">http://www.jivesoftware.org/forums</a>.</p></body>
<p>
An active support community for Jive Messenger is available at
<a href="http://www.jivesoftware.org/forums/">http://www.jivesoftware.org/forums/</a>.
</p>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Jive Messenger Plugin Guide</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<a name="top"></a>
<h1>Jive Messenger Plugin Developer Guide</h1>
<a name="top"></a>
<h2>Introduction</h2>
<p>
Plugins enhance the functionality of Jive Messenger. This document is a
developer's guide for creating plugins.</p>
developer's guide for creating plugins.
</p>
<h2>Structure of a Plugin</h2>
<p>
Plugins live in the <tt>plugins</tt> directory of <tt>messengerHome</tt>. If
a plugin is deployed as a JAR file, it will be automatically expanded into
a directory. The files in a plugin directory are as follows:
</p>
<fieldset>
<legend>Plugin Structure</legend>
<pre>myplugin/
|- plugin.xml &lt;- Plugin definition file
|- classes/ &lt;- Resources your plugin needs (i.e., a properties file)
|- lib/ &lt;- Libraries your plugin needs
|- src/
|- java &lt;- Java source code for your plugin
| |- com
| |- mycompany
| |- *.java
|- web
|- *.jsp &lt;- JSPs your plugin uses for the admin console
|- images/ &lt;- Any images your JSP pages need (optional)
</pre>
</fieldset>
<pre>
plugin.xml
classes/
lib/
web/
|
-- web.xml
-- images/</pre>
<p>The <tt>src/web</tt> directory exists for plugins that need to add content
to the Jive Messenger admin console. Further details are below.</p>
<p>
The <tt>plugin.xml</tt> file specifies the main Plugin class. A sample
file might look like the following:
</p>
<pre>
<fieldset>
<legend>Sample plugin.xml</legend>
<pre class="xml">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;plugin&gt;
<span class="comment">&lt;!-- Main plugin class --&gt;</span>
&lt;class&gt;org.example.ExamplePlugin&lt;/class&gt;
<span class="comment">&lt;!-- Admin console entries --&gt;</span>
&lt;adminconsole&gt;
<span class="comment">&lt;!-- More on this below --&gt;</span>
&lt;/adminconsole&gt;
&lt;/plugin&gt;
</pre>
<p>Your plugin class must be implement the Plugin interface from the Jive
Messenger API. The Plugin interface has methods for initializing and
destroying the plugin, as well as methods for retrieving meta-data such as
the plugin name, description, version, and author.</p>
<p>The <tt>classes</tt> and <tt>lib</tt> directories contain resources
that will be loaded into the classpath of the plugin.</p>
<p>The <tt>web</tt> directory exists for plugins that need to add content
to the Jive Messenger admin console. Further details are below.</p>
</fieldset>
<p>Your plugin class must be implement the
<tt><a href="javadoc/org/jivesoftware/messenger/container/Plugin.html">Plugin</a></tt>
interface from the <a href="javadoc/index.html">Jive Messenger API</a>. The Plugin interface has
methods for initializing and destroying the plugin, as well as methods for retrieving meta-data
such as the plugin name, description, version, and author.
</p>
<fieldset>
<legend>Sample plugin implementation</legend>
<pre class="java">
package org.example;
import org.jivesoftware.messenger.container.Plugin;
import org.jivesoftware.messenger.container.PluginManager;
import java.io.File;
/**
* A sample plugin for Jive Messenger.
*/
public class ExamplePlugin implements Plugin {
public String getName() {
return "My Plugin";
}
public String getDescription() {
return "A simple plugin";
}
public String getAuthor() {
return "Johnny Java Coder";
}
public String getVersion() {
return "1.0";
}
public void initialize(PluginManager manager, File pluginDirectory) {
<span class="comment">// Your code goes here</span>
}
public void destroy() {
<span class="comment">// Your code goes here</span>
}
}
</pre>
</fieldset>
<h2>Modifying the Admin Console</h2>
......@@ -65,33 +131,52 @@ are a several steps to accomplishing this:
servlet entries must be put into the <tt>web/</tt> directory
of the plugin. <i>Note:</i> the Jive Messenger build script
can assist with compiling JSPs and creating the web.xml. This
is detailed later in the developer guide.
is detailed below.
</li>
<li>Any images required by your JSP pages must live in <tt>web/images/</tt>
directory. Only GIF and PNG images are supported.
</li>
</ul>
<p>The &lt;adminconsole/&gt; section of <tt>plugin.xml</tt> defines additional
<p>The <tt>&lt;adminconsole /&gt;</tt> section of <tt>plugin.xml</tt> defines additional
tabs, sections and entries in the Admin Console framework. A sample
<tt>plugin.xml</tt> file might look like the following:</p>
<pre>
<fieldset>
<legend>Sample plugin.xml</legend>
<pre class="xml">
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;plugin&gt;
<span class="comment">&lt;!-- Main plugin class --&gt;</span>
&lt;class&gt;org.example.ExamplePlugin&lt;/class&gt;
&lt;tab id="example" name="Example" description="Click to try the example tab"&gt;
&lt;sidebar name="Test Section"&gt;
&lt;item id="test-page" name="Test Page" url="test.jsp" description="Test page" /&gt;
<span class="comment">&lt;!-- Admin console entries --&gt;</span>
&lt;adminconsole&gt;
&lt;tab id="mytab" name="Example" url="my-plugin-admin.jsp" description="Click to manage..."&gt;
&lt;sidebar id="mysidebar" name="My Plugin"&gt;
&lt;item id="my-plugin" name="My Plugin Admin"
url="my-plugin-admin.jsp"
description="Click to administer settings for my plugin" /&gt;
&lt;/sidebar&gt;
&lt;/tab&gt;
&lt;/adminconsole&gt;
&lt;/plugin&gt;
</pre>
</fieldset>
<p>In this example, we've defined a new tab "Example", a sidebar section
"Test Section" and a page "Test Page". We've registered <tt>test.jsp</tt>
<p>
In this example, we've defined a new tab "Example", a sidebar section
"My Plugin" and a page "My Plugin Admin". We've registered <tt>my-plugin-admin.jsp</tt>
as the page.
</p>
<h2>Using the Jive Messenger Build Script</h2>
<p>
The Jive Messenger build script is designed to help you build and develop plugins.
</p>
<br><br>
</body>
</html>
......@@ -3,12 +3,12 @@ BODY {
background-color : #fff;
}
BODY, TD, TH {
font-family : tahoma, arial, helvetica;
font-size : 0.8em;
font-family : arial, helvetica, sans-serif;
font-size : 10pt;
}
PRE, TT, CODE {
font-family : courier new, monospaced;
font-size : 1.0em;
font-size : 9pt;
}
A:hover {
text-decoration : none;
......@@ -24,20 +24,32 @@ H1 {
padding-bottom : 2px;
}
H2 {
font-size : 12px;
font-size : 1.2em;
font-weight : bold;
}
H3 {
font-size : 12px;
font-size : 1.0em;
font-weight : bold;
}
TT {
font-family : courier new;
font-weight : bold;
color : #060;
}
FIELDSET PRE {
padding : 1em;
margin : 0px;
}
FIELDSET {
margin-left : 2em;
margin-right : 2em;
border : 1px #ccc solid;
-moz-border-radius : 5px;
}
.comment {
color : #666;
font-style : italic;
}
.subheader {
font-weight : bold;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment