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"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> <html>
<head> <head>
<title>Messenger: Overview - Jive Software</title> <title>Messenger: Overview - Jive Software</title>
<link type="text/css" rel="stylesheet" href="style.css"> <link type="text/css" rel="stylesheet" href="style.css">
</head> </head>
<body> <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 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. extensible and flexible deployment into new or existing infrastructure.
The server contains a pluggable backend data storage and security system and 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> <ul>
<li> <a href="install-guide.html">Installation Guide</a> - <li>Requires JDK 1.5</li>
How to install Jive Messenger as a standalone application or into <li>Database (optional -- includes an all-Java embedded database)</li>
an existing application server.</li> </ul>
<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>
<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> </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> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> <html>
<head> <head>
<title>Jive Messenger Plugin Guide</title> <title>Jive Messenger Plugin Guide</title>
<link href="style.css" rel="stylesheet" type="text/css"> <link href="style.css" rel="stylesheet" type="text/css">
</head> </head>
<body> <body>
<a name="top"></a>
<h1>Jive Messenger Plugin Developer Guide</h1> <h1>Jive Messenger Plugin Developer Guide</h1>
<a name="top"></a>
<h2>Introduction</h2> <h2>Introduction</h2>
<p> <p>
Plugins enhance the functionality of Jive Messenger. This document is a 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> <h2>Structure of a Plugin</h2>
<p>
Plugins live in the <tt>plugins</tt> directory of <tt>messengerHome</tt>. If 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 plugin is deployed as a JAR file, it will be automatically expanded into
a directory. The files in a plugin directory are as follows: 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>
<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>
<pre> <p>
plugin.xml
classes/
lib/
web/
|
-- web.xml
-- images/</pre>
The <tt>plugin.xml</tt> file specifies the main Plugin class. A sample The <tt>plugin.xml</tt> file specifies the main Plugin class. A sample
file might look like the following: 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;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;plugin&gt; &lt;plugin&gt;
<span class="comment">&lt;!-- Main plugin class --&gt;</span>
&lt;class&gt;org.example.ExamplePlugin&lt;/class&gt; &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; &lt;/plugin&gt;
</pre> </pre>
</fieldset>
<p>Your plugin class must be implement the Plugin interface from the Jive
Messenger API. The Plugin interface has methods for initializing and <p>Your plugin class must be implement the
destroying the plugin, as well as methods for retrieving meta-data such as <tt><a href="javadoc/org/jivesoftware/messenger/container/Plugin.html">Plugin</a></tt>
the plugin name, description, version, and author.</p> 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
<p>The <tt>classes</tt> and <tt>lib</tt> directories contain resources such as the plugin name, description, version, and author.
that will be loaded into the classpath of the plugin.</p> </p>
<p>The <tt>web</tt> directory exists for plugins that need to add content <fieldset>
to the Jive Messenger admin console. Further details are below.</p> <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> <h2>Modifying the Admin Console</h2>
...@@ -57,41 +123,60 @@ to the Jive Messenger admin console. Further details are below.</p> ...@@ -57,41 +123,60 @@ to the Jive Messenger admin console. Further details are below.</p>
are a several steps to accomplishing this: are a several steps to accomplishing this:
<ul> <ul>
<li>An &lt;adminconsole/&gt; section must be added to the <li>An &lt;adminconsole/&gt; section must be added to the
<tt>plugin.xml</tt> file. <tt>plugin.xml</tt> file.
</li> </li>
<li>JSP files must be compiled and put into the classpath of the <li>JSP files must be compiled and put into the classpath of the
plugin. A <tt>web.xml</tt> file containing the compiled JSP plugin. A <tt>web.xml</tt> file containing the compiled JSP
servlet entries must be put into the <tt>web/</tt> directory servlet entries must be put into the <tt>web/</tt> directory
of the plugin. <i>Note:</i> the Jive Messenger build script of the plugin. <i>Note:</i> the Jive Messenger build script
can assist with compiling JSPs and creating the web.xml. This can assist with compiling JSPs and creating the web.xml. This
is detailed later in the developer guide. is detailed below.
</li> </li>
<li>Any images required by your JSP pages must live in <tt>web/images/</tt> <li>Any images required by your JSP pages must live in <tt>web/images/</tt>
directory. Only GIF and PNG images are supported. directory. Only GIF and PNG images are supported.
</li> </li>
</ul> </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 tabs, sections and entries in the Admin Console framework. A sample
<tt>plugin.xml</tt> file might look like the following:</p> <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;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;plugin&gt; &lt;plugin&gt;
<span class="comment">&lt;!-- Main plugin class --&gt;</span>
&lt;class&gt;org.example.ExamplePlugin&lt;/class&gt; &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; <span class="comment">&lt;!-- Admin console entries --&gt;</span>
&lt;item id="test-page" name="Test Page" url="test.jsp" description="Test page" /&gt; &lt;adminconsole&gt;
&lt;/sidebar&gt; &lt;tab id="mytab" name="Example" url="my-plugin-admin.jsp" description="Click to manage..."&gt;
&lt;/tab&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; &lt;/plugin&gt;
</pre> </pre>
</fieldset>
<p>In this example, we've defined a new tab "Example", a sidebar section <p>
"Test Section" and a page "Test Page". We've registered <tt>test.jsp</tt> In this example, we've defined a new tab "Example", a sidebar section
as the page. "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> </body>
</html> </html>
...@@ -3,12 +3,12 @@ BODY { ...@@ -3,12 +3,12 @@ BODY {
background-color : #fff; background-color : #fff;
} }
BODY, TD, TH { BODY, TD, TH {
font-family : tahoma, arial, helvetica; font-family : arial, helvetica, sans-serif;
font-size : 0.8em; font-size : 10pt;
} }
PRE, TT, CODE { PRE, TT, CODE {
font-family : courier new, monospaced; font-family : courier new, monospaced;
font-size : 1.0em; font-size : 9pt;
} }
A:hover { A:hover {
text-decoration : none; text-decoration : none;
...@@ -24,20 +24,32 @@ H1 { ...@@ -24,20 +24,32 @@ H1 {
padding-bottom : 2px; padding-bottom : 2px;
} }
H2 { H2 {
font-size : 12px; font-size : 1.2em;
font-weight : bold; font-weight : bold;
} }
H3 { H3 {
font-size : 12px; font-size : 1.0em;
font-weight : bold; font-weight : bold;
} }
TT { TT {
font-family : courier new; font-family : courier new;
font-weight : bold; font-weight : bold;
color : #060; 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 { .subheader {
font-weight : bold; 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