Commit 844f3f3b authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Moment of truth, removing original location source. Insert fear here. ;)

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8236 b35dd754-fafc-0310-a699-88a17e54d16e
parent 64d9865a
This diff is collapsed.
Name | Version
-------------------------------------------------------
axis.jar | 1.4
cindy.jar | 2.4.4 (patched [#4])
commons-discovery | 0.2
dwr.jar | 1.1.1 (patched [#3])
irclib.jar | 1.10
jaxrpc.jar | 1.1
jml.jar | svn-20070225
joscar-client.jar | svn-20070204 (patched [#2])
joscar-common.jar | svn-20070204
joscar-protocol.jar | svn-20070204 (patched [#2])
openymsg_network | svn-20070419
openymsg_support | svn-20070419
picocontainer.jar | 1.2.0
saaj.jar | 1.3
smack.jar | 3.0.1
smackx.jar | 3.0.1
xercesImpl.jar | 2.6.2
xml-apis.jar | 2.6.2
wsdl4j | 1.5.1
ymsg_network.jar | 0.61 (patched [#1])
ymsg_support.jar | 0.61 (patched [#1])
Patch Descriptions
1) jymsg patches
- original 0.60 patched to 0.61 via security patch
http://jymsg9.sourceforge.net/patch_0_61.zip
- adjusted build version to 0.61
- applied 'getNthValue2' patch, don't recall where i got it, effects custom status
- applied patch to fix statuses not being set correctly
http://sourceforge.net/tracker/download.php?group_id=76691&atid=547951&file_id=156956&aid=1362244
2) joscar patches
- applied patches from Damian Minkov for numerous ICQ fixes
http://groups.google.com/group/joscar-discuss/browse_thread/thread/e73fd2a3011cd0df
- applied minor patch to get ICQ encoding fixed again
3) dwr patches
- Derek did something to DWR itself to make it work, I don't have details
4) cindy patches
- silenced session X idle messages.
<?xml version="1.0" encoding="UTF-8"?>
<plugin>
<!-- Main plugin class -->
<class>org.jivesoftware.openfire.gateway.GatewayPlugin</class>
<!-- Plugin meta-data -->
<name>${gateway.name}</name>
<description>${gateway.description}</description>
<author>Daniel Henninger</author>
<version>1.0.1</version>
<date>04/12/2007</date>
<minServerVersion>3.3.0</minServerVersion>
<databaseKey>gateway</databaseKey>
<databaseVersion>2</databaseVersion>
<licenseType>gpl</licenseType>
<!-- Admin console meta-data -->
<adminconsole>
<tab id="tab-server">
<sidebar id="gateways" name="${gateway.gateways}" description="${gateway.gateways.desc}">
<item id="gateway-settings"
name="${gateway.settings}"
url="gateway-settings.jsp"
description="${gateway.settings.desc}"/>
<item id="gateway-registrations"
name="${gateway.registrations}"
url="gateway-registrations.jsp"
description="%{gateway.registrations.desc}"/>
</sidebar>
</tab>
</adminconsole>
</plugin>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Openfire Readme</title>
<style type="text/css">
/* global font and body settings */
body {
font-size : 100%;
background-color : #d3d6d9;
padding: 0px;
margin: 0px 0px 30px 0px;
}
body, td, th {
font-family : arial, helvetica, sans-serif;
font-size : 10pt;
}
pre, tt, code {
font-family : courier new, monospace;
font-size : 9pt;
}
#pageContainer {
display: block;
position: relative;
clear: both;
background-color: #fff;
border: 1px solid #999;
padding: 40px;
margin: 30px;
}
#pageHeader {
display: block;
position: relative;
height: 80px;
background-color: #e7eaee;
border: 1px solid #cccccc;
border-bottom: none;
margin: 10px 0px 0px 0px;
}
#pageBody {
margin: 0px 18px 0px 20px;
}
/* anchors */
a:link {
color: #11568c;
}
a:visited {
color: #571c8d;
}
a:hover {
color: #7a1d42;
text-decoration : underline;
}
a:active {
color: #7a1d42;
}
/* page header elements (logo and navigation) */
.navigation {
display: block;
position: relative;
height: 20px;
background-color: #335588;
border: 1px solid #cccccc;
border-top: none;
color: #ffffff;
font-size: 11px;
line-height: 18px;
padding: 0px 0px 0px 0px;
margin: 0px 0px 25px 0px;
overflow: hidden;
}
.navigation a {
margin: 0px 20px 0px 20px;
}
.navigation a:link { color: #ffffff; }
.navigation a:visited { color: #ffffff; }
.navigation a:hover { color: #ffffff; }
.navigation a:active { color: #ffffff; }
/* headings */
h1 {
display: block;
position: relative;
font-size : 1.7em;
font-weight : bold;
color: #670e15;
padding: 0px;
margin: 30px 0px 0px 20px;
}
h2 {
font-size : 1.3em;
font-weight : bold;
margin: 40px 0px 6px 0px;
padding: 0px;
color: #335588;
}
h3 {
font-size : 1.0em;
font-weight : bold;
margin: 25px 0px 3px 0px;
padding: 0px;
color: #334466;
}
/* general elements */
p {
margin: 0px 0px 15px 0px;
}
ul {
margin: 5px 0px 15px 35px;
}
li {
padding-bottom : 4px;
}
tt {
font-family : courier new, monospace;
font-weight : bold;
color : #060;
}
hr {
display: block;
height: 1px;
background-color: #999999;
border: none;
margin: 40px 0px 20px 0px;
}
.footer {
font-size : 8pt;
color : #666;
text-align : center;
margin-top : 2em;
padding-top : 0.5em;
border-top : 1px #CCC solid;
}
</style>
</head>
<body>
<div id="pageContainer">
<div id="pageHeader">
<h1>IM Gateway Readme</h1>
</div>
<div id="pageBody">
<h2>Overview</h2>
<p>
The IM (instant messaging) gateway plugin allows users to log in to and
communicate through other instant messaging services via their Jabber
accounts. The gateway itself provides a number of "transports" to other
protocols (AIM, ICQ, MSN, Yahoo, etc).
</p>
<h2>Terminology</h2>
<p>
To help identify the differences between the plugin as a whole and the
underlying interfaces to external protocols (AIM, ICQ, etc), we refer
to the plugin itself as the "gateway" while we refer to the protocol
handlers as "transports".
</p>
<h2>Installation</h2>
<p>
Copy the gateway.jar into the plugins directory of your Openfire
installation. The plugin will then be automatically deployed. To upgrade to a
new version, copy the new gateway.jar file over the existing file. Please
be aware that an upgrade will cause all of the users on your server who are
making use of the plugin to be disconnected from their external IM accounts.
Your users should be reconnected after the plugin reloads.
</p>
<h2>Configuration</h2>
<p>
By default, after the plugin has been deployed all of its features are disabled.
This plugin is configured via the "Gateways" sidebar item located in the Openfire
Admin Console. You can enable individual transports via the "Settings" sidebar
item, and add new registrations/view existing registrations from the "Registrations"
sidebar item.
</p>
<h2>Using the plugin</h2>
<p>
Before going into specifics, there are some important things you need to
know first. A user must be registered with a transport in order to make
use of it. Registration is the process wherein a user tells a transport
what username and password will be used with the external service. This
process also places the transport JID in their roster to that the
transport itself can "hear" them come online, and act appropriately (logging
them in and such). In this case, we interact with the user's roster directly,
so there is no need for a flood of subscription requests to the client itself.
A side effect of this is that only users of the local Openfire server will
be able to make use of any transport on the gateway. Roster items are created
as non-persistent, which means that when the end user logs out or disconnects
from the gateway, the associated transport roster items will no longer exist
in their roster.
</p>
<h3>For admins:</h3>
<p>
The web interface of the gateway plugin provides a mechanism for setting
up registrations on a user's behalf, as well as editing and deleting them.
It also provides tools for monitoring who is using the gateway, their status,
etc. In a typical setup, a user will be allowed to register an account
themselves. See the next section for details on this. You can also
set who has access to the specific transports and even enforce manual
registrations only. If a specific transport has any options, they will
be made available from the web interface.
</p>
<p>
If you have a firewall set up, you do not need to open any inbound ports.
However, you will need to make sure the following outgoing connections
will work based on the transport in question:
<ul>
<li>AIM: login.oscar.aol.com 5190</li>
<li>ICQ: login.oscar.aol.com 5190</li>
<li>IRC: irc.freenode.net 7000</li>
<li>MSN: messenger.hotmail.com 1863</li>
<li>Yahoo: scs.msg.yahoo.com 5050</li>
</ul>
Please be aware that these are only the initial connections made. Many of
the services will connect to other servers for difference aspects of your
legacy IM session. All of these connections should stay on the same port
though. There may be ranges of IP addresses or something that you can
open up but I do not know those lists. Also, it is now possible to change
the initial connect host and port via
<a href="http://wiki.igniterealtime.org/display/WILDFIRE/Wildfire+Properties">Openfire Properties</a>.
</p>
<p>
There is additional documentation available at:
<a href="http://wiki.igniterealtime.org/display/WILDFIRE/IM+Gateway+Plugin">IM Gateway Plugin Wiki</a>
</p>
<h3>For end users:</h3>
<p>
Typically, users will use Service Discovery (aka disco) to find out what
services are available on a server, and then will be provided with a way
to register with whatever transports are made available. Some clients
do not have the functionality to interact with transports. In this case,
a server admin will need to register the user on their behalf. (see above)
</p>
<p>
When registering with any IM Gateway transports, you will see the transport
itself show up in your XMPP roster. This is normal and is how the transport
knows when you are logged in or not, and detects status changes. Removal of
the transport roster items will typically remove your registration with the
transport as well.
</p>
<p>
<b>Special note for Spark:</b> As of this release, and an upcoming release
of Spark, you will not have the transports in your roster when you register
from Spark. This is an experimental feature for a smoother user experience.
Note that if you register from Spark and then move to another client, you
will not automatically log into any transports. If you plan to dance between
clients and not use Spark exclusively, I would recommend you register from
another client than Spark.
</p>
<h2>Trouble shooting</h2>
<p>
If the plugin behaviour is not as expected you can enable server debug logging.
This will allow the plugin to start logging. Server debug logging should only
be enabled temporarily, as it will generate a lot of additional logging that
will both slow your server down and consume a lot of disk space.
</p>
<div class="footer">
Copyright &copy; Jive Software, 2006-2007
</div>
</div>
</div>
</body>
</html>
CREATE TABLE gatewayRegistration (
registrationID BIGINT NOT NULL,
jid VARCHAR(255) NOT NULL,
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255) NOT NULL,
password VARCHAR(255),
nickname VARCHAR(255),
registrationDate BIGINT NOT NULL,
lastLogin BIGINT,
CONSTRAINT gatewayReg_pk PRIMARY KEY (registrationID)
);
CREATE INDEX gatewayReg_jid_idx ON gatewayRegistration (jid);
CREATE INDEX gatewayReg_type_idx ON gatewayRegistration (transportType);
CREATE TABLE gatewayPseudoRoster (
registrationID BIGINT NOT NULL,
username VARCHAR(255) NOT NULL,
nickname VARCHAR(255),
groups VARCHAR(255)
);
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
CREATE INDEX gatewayRstr_uname_idx ON gatewayRestrictions (username);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
CREATE TABLE gatewayRegistration (
registrationID BIGINT NOT NULL,
jid VARCHAR(255) NOT NULL,
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255) NOT NULL,
password VARCHAR(255),
nickname VARCHAR(255),
registrationDate BIGINT NOT NULL,
lastLogin BIGINT,
CONSTRAINT gatewayReg_pk PRIMARY KEY (registrationID)
);
CREATE INDEX gatewayReg_jid_idx ON gatewayRegistration (jid);
CREATE INDEX gatewayReg_type_idx ON gatewayRegistration (transportType);
CREATE TABLE gatewayPseudoRoster (
registrationID BIGINT NOT NULL,
username VARCHAR(255) NOT NULL,
nickname VARCHAR(255),
groups VARCHAR(255)
);
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
CREATE INDEX gatewayRstr_uname_idx ON gatewayRestrictions (username);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
CREATE TABLE gatewayRegistration (
registrationID BIGINT NOT NULL,
jid VARCHAR(255) NOT NULL,
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255) NOT NULL,
password VARCHAR(255),
nickname VARCHAR(255),
registrationDate BIGINT NOT NULL,
lastLogin BIGINT,
PRIMARY KEY (registrationID),
INDEX gatewayReg_jid_idx(jid),
INDEX gatewayReg_type_idx(transportType)
);
CREATE TABLE gatewayPseudoRoster (
registrationID BIGINT NOT NULL,
username VARCHAR(255) NOT NULL,
nickname VARCHAR(255),
groups VARCHAR(255),
INDEX gatewayPsRs_regid_idx(registrationID),
INDEX gatewayPsRs_uname_idx(username)
);
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50),
INDEX gatewayRstr_ttype_idx(transportType),
INDEX gatewayRstr_uname_idx(username)
);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
CREATE TABLE gatewayRegistration (
registrationID INTEGER NOT NULL,
jid VARCHAR2(255) NOT NULL,
transportType VARCHAR2(15) NOT NULL,
username VARCHAR2(255) NOT NULL,
password VARCHAR2(255),
nickname VARCHAR2(255),
registrationDate INTEGER NOT NULL,
lastLogin INTEGER,
CONSTRAINT gatewayReg_pk PRIMARY KEY (registrationID)
);
CREATE INDEX gatewayReg_jid_idx ON gatewayRegistration (jid);
CREATE INDEX gatewayReg_type_idx ON gatewayRegistration (transportType);
CREATE TABLE gatewayPseudoRoster (
registrationID INTEGER NOT NULL,
username VARCHAR2(255) NOT NULL,
nickname VARCHAR2(255),
groups VARCHAR2(255)
);
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
CREATE TABLE gatewayRestrictions (
transportType VARCHAR2(15) NOT NULL,
username VARCHAR2(255),
groupname VARCHAR2(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
CREATE INDEX gatewayRstr_uname_idx ON gatewayRestrictions (username);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
commit;
CREATE TABLE gatewayRegistration (
registrationID BIGINT NOT NULL,
jid VARCHAR(255) NOT NULL,
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255) NOT NULL,
password VARCHAR(255),
nickname VARCHAR(255),
registrationDate BIGINT NOT NULL,
lastLogin BIGINT,
CONSTRAINT gatewayReg_pk PRIMARY KEY (registrationID)
);
CREATE INDEX gatewayReg_jid_idx ON gatewayRegistration (jid);
CREATE INDEX gatewayReg_type_idx ON gatewayRegistration (transportType);
CREATE TABLE gatewayPseudoRoster (
registrationID BIGINT NOT NULL,
username VARCHAR(255) NOT NULL,
nickname VARCHAR(255),
groups VARCHAR(255)
);
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
CREATE INDEX gatewayRstr_uname_idx ON gatewayRestrictions (username);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
CREATE TABLE gatewayRegistration (
registrationID BIGINT NOT NULL,
jid NVARCHAR(255) NOT NULL,
transportType NVARCHAR(15) NOT NULL,
username NVARCHAR(255) NOT NULL,
password NVARCHAR(255),
nickname NVARCHAR(255),
registrationDate BIGINT NOT NULL,
lastLogin BIGINT,
CONSTRAINT gatewayReg_pk PRIMARY KEY (registrationID)
);
CREATE INDEX gatewayReg_jid_idx ON gatewayRegistration (jid);
CREATE INDEX gatewayReg_type_idx ON gatewayRegistration (transportType);
CREATE TABLE gatewayPseudoRoster (
registrationID BIGINT NOT NULL,
username NVARCHAR(255) NOT NULL,
nickname NVARCHAR(255),
groups NVARCHAR(255)
);
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
CREATE TABLE gatewayRestrictions (
transportType NVARCHAR(15) NOT NULL,
username NVARCHAR(255),
groupname NVARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
CREATE INDEX gatewayRstr_uname_idx ON gatewayRestrictions (username);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
CREATE TABLE gatewayRegistration (
registrationID INTEGER NOT NULL,
jid NVARCHAR(255) NOT NULL,
transportType NVARCHAR(15) NOT NULL,
username NVARCHAR(255) NOT NULL,
password NVARCHAR(255),
nickname NVARCHAR(255),
registrationDate INTEGER NOT NULL,
lastLogin INTEGER,
CONSTRAINT gatewayReg_pk PRIMARY KEY (registrationID)
);
CREATE INDEX gatewayReg_jid_idx ON gatewayRegistration (jid);
CREATE INDEX gatewayReg_type_idx ON gatewayRegistration (transportType);
CREATE TABLE gatewayPseudoRoster (
registrationID INTEGER NOT NULL,
username NVARCHAR(255) NOT NULL,
nickname NVARCHAR(255),
groups NVARCHAR(255)
);
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
CREATE TABLE gatewayRestrictions (
transportType NVARCHAR(15) NOT NULL,
username NVARCHAR(255),
groupname NVARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
CREATE INDEX gatewayRstr_uname_idx ON gatewayRestrictions (username);
INSERT INTO jiveVersion (name, version) VALUES ('gateway', 2);
-- Add nickname to registration table
ALTER TABLE gatewayRegistration ADD COLUMN nickname VARCHAR(255);
-- Add pseudo roster table
CREATE TABLE gatewayPseudoRoster (
registrationID BIGINT NOT NULL,
username VARCHAR(255) NOT NULL,
nickname VARCHAR(255),
groups VARCHAR(255)
);
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
-- Update database version
UPDATE jiveVersion SET version = 1 WHERE name = 'gateway';
// Add nickname to registration table
ALTER TABLE gatewayRegistration ADD COLUMN nickname VARCHAR(255) BEFORE registrationDate;
// Add pseudo roster table
CREATE TABLE gatewayPseudoRoster (
registrationID BIGINT NOT NULL,
username VARCHAR(255) NOT NULL,
nickname VARCHAR(255),
groups VARCHAR(255)
);
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
// Update database version
UPDATE jiveVersion SET version = 1 WHERE name = 'gateway';
# Add nickname to registration table
ALTER TABLE gatewayRegistration ADD COLUMN nickname VARCHAR(255) NULL AFTER password;
# Add pseudo roster table
CREATE TABLE gatewayPseudoRoster (
registrationID BIGINT NOT NULL,
username VARCHAR(255) NOT NULL,
nickname VARCHAR(255),
groups VARCHAR(255),
INDEX gatewayPsRs_regid_idx(registrationID),
INDEX gatewayPsRs_uname_idx(username)
);
# Update database version
UPDATE jiveVersion SET version = 1 WHERE name = 'gateway';
-- Add nickname column to registration table
ALTER TABLE gatewayRegistration ADD nickname VARCHAR2(255) NULL;
-- Add pseudo roster table
CREATE TABLE gatewayPseudoRoster (
registrationID INTEGER NOT NULL,
username VARCHAR2(255) NOT NULL,
nickname VARCHAR2(255),
groups VARCHAR2(255)
);
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
-- Update database version
UPDATE jiveVersion SET version = 1 WHERE name = 'gateway';
commit;
-- Add nickname column to registration table
ALTER TABLE gatewayRegistration ADD COLUMN nickname VARCHAR(255);
-- Add pseudo roster table
CREATE TABLE gatewayPseudoRoster (
registrationID BIGINT NOT NULL,
username VARCHAR(255) NOT NULL,
nickname VARCHAR(255),
groups VARCHAR(255)
);
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
-- Update database version
UPDATE jiveVersion SET version = 1 WHERE name = 'gateway';
/* Add nickname column to registration table */
ALTER TABLE gatewayRegistration ADD nickname NVARCHAR(255);
/* Add pseudo roster table */
CREATE TABLE gatewayPseudoRoster (
registrationID BIGINT NOT NULL,
username NVARCHAR(255) NOT NULL,
nickname NVARCHAR(255),
groups NVARCHAR(255)
);
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
/* Update database version */
UPDATE jiveVersion SET version = 1 WHERE name = 'gateway';
/* Add nickname column to registration table */
ALTER TABLE gatewayRegistration ADD nickname NVARCHAR(255);
/* Add pseudo roster table */
CREATE TABLE gatewayPseudoRoster (
registrationID INTEGER NOT NULL,
username NVARCHAR(255) NOT NULL,
nickname NVARCHAR(255),
groups NVARCHAR(255)
);
CREATE INDEX gatewayPsRs_regid_idx ON gatewayPseudoRoster (registrationID);
CREATE INDEX gatewayPsRs_uname_idx ON gatewayPseudoRoster (username);
/* Update database version */
UPDATE jiveVersion SET version = 1 WHERE name = 'gateway';
-- Add restrictions table
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
CREATE INDEX gatewayRstr_uname_idx ON gatewayRestrictions (username);
-- Update database version
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
// Add restrictions table
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
CREATE INDEX gatewayRstr_uname_idx ON gatewayRestrictions (username);
// Update database version
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
# Add restrictions table
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50),
INDEX gatewayRstr_ttype_idx(transportType),
INDEX gatewayRstr_uname_idx(username)
);
# Update database version
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
-- Add restrictions table
CREATE TABLE gatewayRestrictions (
transportType VARCHAR2(15) NOT NULL,
username VARCHAR2(255),
groupname VARCHAR2(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
CREATE INDEX gatewayRstr_uname_idx ON gatewayRestrictions (username);
-- Update database version
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
commit;
-- Add restrictions table
CREATE TABLE gatewayRestrictions (
transportType VARCHAR(15) NOT NULL,
username VARCHAR(255),
groupname VARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
CREATE INDEX gatewayRstr_uname_idx ON gatewayRestrictions (username);
-- Update database version
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
/* Add restrictions table */
CREATE TABLE gatewayRestrictions (
transportType NVARCHAR(15) NOT NULL,
username NVARCHAR(255),
groupname NVARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
CREATE INDEX gatewayRstr_uname_idx ON gatewayRestrictions (username);
/* Update database version */
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
/* Add restrictions table */
CREATE TABLE gatewayRestrictions (
transportType NVARCHAR(15) NOT NULL,
username NVARCHAR(255),
groupname NVARCHAR(50)
);
CREATE INDEX gatewayRstr_ttype_idx ON gatewayRestrictions (transportType);
CREATE INDEX gatewayRstr_uname_idx ON gatewayRestrictions (username);
/* Update database version */
UPDATE jiveVersion SET version = 2 WHERE name = 'gateway';
This diff is collapsed.
##
## IM Gateway Resource Bundle - Italian locale (it)
##
## For a full changelog, refer to the English bundle, gateway_i18n.properties.
# Temporary Tags Until Fixed Properly
login.title=Console Amministrativa
global.add=Aggiungi
global.edit=Modifica
global.delete=Elimina
global.cancel=Cancella
global.save_changes=Salva le modifiche
# Globals
gateway.name=IM Gateway
gateway.description=Provides gateway connectivity to the other public instant messaging networks
gateway.gateways=Gateways
gateway.gateways.desc=Gateway setup
gateway.settings=Settings
gateway.settings.desc=Click to manage the service that provides access to other IM networks
gateway.registrations=Registrations
gateway.registrations.desc=Click to view and manage the user registrations to other IM networks
# Base Transport
gateway.base.notloggedin=In questo momento non sei loggato nel trasporto {0}.
gateway.base.enterusername=Prego inserire {0} lo username della persona che vuoi aggiungere.
gateway.base.registrationdeniedbyacls=La registrazione \u00c3\u00a8 stata rifiutata perch\u00c3\u00a8 l'account non \u00c3\u00a8 nella lista di accesso.
gateway.base.registrationdeniedbyhost=La registrazione \u00c3\u00a8 stata rifiutata perch\u00c3\u00a8 l'account non esiste nel server di trasporto.
gateway.base.registrationdeniednoacct=La registrazione \u00c3\u00a8 stata rifiutata perch\u00c3\u00a8 non hai un account registrato nel server.
gateway.base.registrationdeniedbadusername=La registrazione \u00c3\u00a8 stata rifiutata perch\u00c3\u00a8 lo username che hai inserito non \u00c3\u00a8 valido per il servizio.
# OSCAR 'Global' (both AIM/ICQ Transport)
gateway.oscar.connectionfailed=Connessione fallita:
gateway.oscar.accountdeleted=L'account \u00c3\u00a8 stato cancellato.
gateway.oscar.badinput=Inserito uno username non valido.
gateway.oscar.badpassword=Password non corretta.
gateway.oscar.oldclient=Il Plugin si \u00c3\u00a8 definito come obsoleto. Contattare lo sviluppatore.
gateway.oscar.connectedtoomuch=Ti sei connesso troppe volte nell'arco di tempo previsto. Per favore attendi almeno 15 minuti prima di riprovare.
gateway.oscar.baduserorpass=Nome utente o password non validi. Reinserirli.
gateway.oscar.accountsuspended=Il tuo account \u00c3\u00a8 stato temporaneamente sospeso.
gateway.oscar.unknownerror=Codice di errore sconosciuto ricevuto da AIM: {0}\nURL: {1}
gateway.oscar.disconnected=Sei stato disconnesso automaticamente dal server.
gateway.oscar.away=Away
# AIM Transport
gateway.aim.shortservice=AIM
gateway.aim.service=AOL Instant Messenger
gateway.aim.name=Trasporto AIM
gateway.aim.username=Username
gateway.aim.password=Password
gateway.aim.registration=Inserire username e password per AIM.
gateway.aim.warninganon=Hai ricevuto una notifica di anonimit\u00c3\u00a0 da AIM. Il tuo livello di attenzione \u00c3\u00a8 ora {0}%.
gateway.aim.warningdirect=Hai ricevuto una notifica di warning da AIM {0}. Il tuo livello di attenzione \u00c3\u00a8 ora {1}%.
# ICQ Transport
gateway.icq.shortservice=ICQ
gateway.icq.service=ICQ
gateway.icq.name=Trasporto ICQ
gateway.icq.username=UIN/ICQ#
gateway.icq.password=Password
gateway.icq.registration=Inserire utente e password per ICQ# (UIN).
# MSN Transport
gateway.msn.shortservice=MSN
gateway.msn.service=MSN Messenger
gateway.msn.name=Trasporto MSN
gateway.msn.username=Indirizzo E-Mail
gateway.msn.password=Password
gateway.msn.registration=Inserire il tuo account e password per MSN Passport.
gateway.msn.passwordincorrect=La password con cui ti sei registrato non \u00c3\u00a8 corretta. Reinserirla.
gateway.msn.sendmsgfailed=Impossibile inviare messaggi MSN. Motivo:
gateway.msn.illegalaccount=Sei registrato al trasporto MSN con un account non valido.\nL'account dovrebbe essere un indirizzo email.\nSei registrato come:
gateway.msn.disconnect=Sei stato disconnesso da MSN.
gateway.msn.wink=Hai ricevuto un wink da MSN.
gateway.msn.nudge=Hai ricevuto un nudge da MSN.
gateway.msn.otherloggedin=Sei stato disconnesso da MSN perch\u00c3\u00a8 il tuo account si \u00c3\u00a8 registrato altrove.
# Yahoo Transport
gateway.yahoo.shortservice=Yahoo
gateway.yahoo.service=Yahoo! Messenger
gateway.yahoo.name=Trasporto Yahoo!
gateway.yahoo.username=Yahoo! ID
gateway.yahoo.password=Password
gateway.yahoo.registration=Inserire ID e password per Yahoo!.
gateway.yahoo.error=Errore da Yahoo:
gateway.yahoo.mail=Hai {0} messaggio(i) su Yahoo! mail.
gateway.yahoo.loginrefused=Tentativo di accesso fallito su Yahoo!. (login rifiutato)
gateway.yahoo.unknownuser=Yahoo! non ha riconosciuto lo username con cui ti sei registrato. Inserire lo username corretto.
gateway.yahoo.badpassword=Login refiutato da Yahoo!, forse per un errore di password. Inserire la password corretta.
gateway.yahoo.accountlocked=L'accesso al tuo Yahoo! account \u00c3\u00a8 bloccato.
gateway.yahoo.accountlockedwithurl=L'accesso al tuo Yahoo! account \u00c3\u00a8 bloccato. Visitare {0}
gateway.yahoo.unknownerror=Login fallito a Yahoo! messenger account. (errore sconosciuto)
# IRC Transport
gateway.irc.shortservice=IRC
gateway.irc.service=IRC
gateway.irc.name=Trasporto IRC
gateway.irc.username=Username
gateway.irc.password=Password
gateway.irc.nickname=Nickname
gateway.irc.registration=Inserire username, password e nickname per IRC. Il Nickname \u00c3\u00a8 lo username primario usato mentre username e password sono usati per l'autenticazione. Se la password non \u00c3\u00a8 richiesta, non inserirla.
gateway.irc.away=Away
gateway.irc.extendedaway=Away Esteso
gateway.irc.donotdisturb=Non Disturbare
gateway.irc.errorreceived=Errore IRC ricevuto:
gateway.irc.errorreceivedwithcode=Errore IRC ricevuto (code {0}):
# XMPP Transport
gateway.xmpp.shortservice=XMPP
gateway.xmpp.service=XMPP
gateway.xmpp.name=XMPP Transport
gateway.xmpp.username=JID
gateway.xmpp.password=Password
gateway.xmpp.registration=Please enter your XMPP JID and password as it's used on the XMPP server pointed to by the transport.
# Google Talk Transport
gateway.gtalk.shortservice=GTalk
gateway.gtalk.service=Google Talk
gateway.gtalk.name=Google Talk Transport
gateway.gtalk.username=Address
gateway.gtalk.registration=Please enter your e-mail address and password used with GMail and GTalk.
# Web Interface (Settings)
gateway.web.settings.instructions=Seleziona quale gateway permettere, quali opzioni disponibili, e chi si pu\u00c3\u00b2 connettere a ciascun servizio. Selezionare un gateway abilita il servizio stesso.
gateway.web.settings.tests=Tests
gateway.web.settings.options=Opzioni
gateway.web.settings.permissions=Permessi
gateway.web.settings.connecttohost=Connetti all'host
gateway.web.settings.connecttoport=Connetti alla porta
gateway.web.settings.testconnection=Test di Connessione
gateway.web.settings.saveoptions=Opzioni di Salvataggio
gateway.web.settings.cancelchanges=Scarta i cambiamenti
gateway.web.settings.registernone=Solo Registrazione Manuale (esamina la sezioni sulle registrazioni nella manpage)
gateway.web.settings.registersome=Questi utenti/gruppi possono registrarsi
gateway.web.settings.registerall=Tutti gli utenti possono registrarsi
gateway.web.settings.users=Utenti
gateway.web.settings.groups=Gruppi
gateway.web.settings.savepermissions=Permessi di salvataggio
gateway.web.settings.title=Opzioni del Gateway
gateway.web.settings.settingssaved=Opzioni salvate
gateway.web.settings.cancelledchanges=Cambiamenti scartati
gateway.web.settings.success=Successo
gateway.web.settings.failed=Faillito
gateway.web.settings.permissionssaved=Permessi salvati
gateway.web.settings.host=Host
gateway.web.settings.port=Porta
gateway.web.settings.encoding=Encoding
gateway.web.settings.unstable.title=Gateways sperimentali
gateway.web.settings.unstable.notice=I seguenti gateways sono sperimentali e non raccomandati in ambienti di produzione. Essi sono forniti con l'intento di provare servizi non stabili e non funzionanti nella maniera corretta.
# Web Interface (Registrations)
gateway.web.registrations.instructions=Sotto troverete la lista di tutti i gateway di registrazione. Se intendete filtrarli per sessioni attive e/o per specifico gateway seleziona le opzioni qui sotto e aggiorna la visualizzazione.
gateway.web.registrations.addnewreg=Aggiungi una nuova registrazione
gateway.web.registrations.cancelnewreg=Scarta l'aggiunta di una nuova registrazione
gateway.web.registrations.username=username
gateway.web.registrations.password=password
gateway.web.registrations.nickname=nickname
gateway.web.registrations.jid=utente (JID)
gateway.web.registrations.gateway=gateway
gateway.web.registrations.signedon=Registrato solamente
gateway.web.registrations.update=Aggiorna
gateway.web.registrations.next=Successivo
gateway.web.registrations.prev=Precedente
gateway.web.registrations.remove=Elimina
gateway.web.registrations.edit=Modifica
gateway.web.registrations.lastlogin=Ultimo Login
gateway.web.registrations.serviceusername=Servizio/Username
gateway.web.registrations.user=Utente
gateway.web.registrations.confirmdelete=Sei sicuro di voler eliminare la registrazione?
gateway.web.registrations.registrations=Registrazioni
gateway.web.registrations.title=Gateway Registrazioni
gateway.web.registrations.xmppnotfound=Impossibile trovare l'account XMPP.
gateway.web.registrations.regnotfound=Impossibile trovare la registrazione.
gateway.web.registrations.notenabled=Il trasporto non \u00c3\u00a8 abilitato. Abilitarlo prima di procedere ulteriormente.
gateway.web.registrations.illegaldomain=L'account XMPP non \u00c3\u00a8 in questo server.
gateway.web.registrations.invaliduser=Username non valido per questo servizio.
gateway.web.registrations.deletesuccess=Registrazione eliminata correttamente.
gateway.web.registrations.updatesuccess=Registrazione aggiornata correttamente.
gateway.web.registrations.addsuccess=Registrazione aggiunta correttamente.
gateway.web.registrations.never=never
gateway.web.registrations.page=Page
gateway.web.registrations.perpage=per page
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006-2007 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.gateway;
/**
* An enumeration for different chat state types.
*
* This class contains a list of all of the possible chat states.
*
* @author Daniel Henninger
*/
public enum ChatStateType {
/**
* Active (user is actively participating in a conversation)
*/
active,
/**
* Composing (user is currently composing a message)
*/
composing,
/**
* Paused (user has paused while composing a message)
*/
paused,
/**
* Inactive (user has not interacted with the chat session for a short period of time)
*/
inactive,
/**
* Gone (user has not interacted with the chat session for a long period of time)
*/
gone
}
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006-2007 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.gateway;
import org.jivesoftware.util.LocaleUtils;
import org.jivesoftware.openfire.container.Plugin;
import org.jivesoftware.openfire.container.PluginManager;
import org.xmpp.component.ComponentManager;
import org.xmpp.component.ComponentManagerFactory;
import org.picocontainer.MutablePicoContainer;
import org.picocontainer.defaults.DefaultPicoContainer;
import org.dom4j.DocumentHelper;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.io.SAXReader;
import java.io.File;
import java.io.FileReader;
import java.io.FileNotFoundException;
import java.util.Hashtable;
/**
* IM Gateway plugin, which provides connectivity to IM networks that
* don't support the XMPP protocol.
*
* The entire plugin is referred to as the gateway, while individual
* IM network mappings are referred to as transports.
*
* @author Daniel Henninger
*/
public class GatewayPlugin implements Plugin {
private MutablePicoContainer picoContainer;
private File pluginDirectory;
private PluginManager pluginManager;
/**
* Represents all configured transport handlers.
*/
public Hashtable<String,TransportInstance> transports;
public GatewayPlugin() {
picoContainer = new DefaultPicoContainer();
picoContainer.registerComponentImplementation(RegistrationManager.class);
}
public void initializePlugin(PluginManager manager, File pluginDirectory) {
this.pluginDirectory = pluginDirectory;
this.pluginManager = manager;
picoContainer.start();
transports = new Hashtable<String,TransportInstance>();
ComponentManager componentManager = ComponentManagerFactory.getComponentManager();
/* Set up AIM transport. */
transports.put("aim", new TransportInstance(TransportType.aim, LocaleUtils.getLocalizedString("gateway.aim.name", "gateway"), "org.jivesoftware.openfire.gateway.protocols.oscar.OSCARTransport", componentManager));
maybeStartService("aim");
/* Set up ICQ transport. */
transports.put("icq", new TransportInstance(TransportType.icq, LocaleUtils.getLocalizedString("gateway.icq.name", "gateway"), "org.jivesoftware.openfire.gateway.protocols.oscar.OSCARTransport", componentManager));
maybeStartService("icq");
/* Set up IRC transport. */
transports.put("irc", new TransportInstance(TransportType.irc, LocaleUtils.getLocalizedString("gateway.irc.name", "gateway"), "org.jivesoftware.openfire.gateway.protocols.irc.IRCTransport", componentManager));
maybeStartService("irc");
/* Set up Yahoo transport. */
transports.put("yahoo", new TransportInstance(TransportType.yahoo, LocaleUtils.getLocalizedString("gateway.yahoo.name", "gateway"), "org.jivesoftware.openfire.gateway.protocols.yahoo.YahooTransport", componentManager));
maybeStartService("yahoo");
/* Set up MSN transport. */
transports.put("msn", new TransportInstance(TransportType.msn, LocaleUtils.getLocalizedString("gateway.msn.name", "gateway"), "org.jivesoftware.openfire.gateway.protocols.msn.MSNTransport", componentManager));
maybeStartService("msn");
/* Set up XMPP transport. */
transports.put("xmpp", new TransportInstance(TransportType.xmpp, LocaleUtils.getLocalizedString("gateway.xmpp.name", "gateway"), "org.jivesoftware.openfire.gateway.protocols.xmpp.XMPPTransport", componentManager));
maybeStartService("xmpp");
/* Set up GTalk transport. */
transports.put("gtalk", new TransportInstance(TransportType.gtalk, LocaleUtils.getLocalizedString("gateway.gtalk.name", "gateway"), "org.jivesoftware.openfire.gateway.protocols.xmpp.XMPPTransport", componentManager));
maybeStartService("gtalk");
}
public void destroyPlugin() {
for (TransportInstance trInstance : transports.values()) {
trInstance.stopInstance();
}
picoContainer.stop();
picoContainer.dispose();
picoContainer = null;
}
/**
* Returns the instance of a module registered with the plugin.
*
* @param clazz the module class.
* @return the instance of the module.
*/
public Object getModule(Class clazz) {
return picoContainer.getComponentInstanceOfType(clazz);
}
/**
* Returns the plugin manager handling the plugin.
*
* @return plugin manager in question.
*/
public PluginManager getPluginManager() {
return pluginManager;
}
/**
* Starts a transport service, identified by subdomain. The transport
* service will only start if it is enabled.
*
* @param serviceName name of service to start.
*/
private void maybeStartService(String serviceName) {
TransportInstance trInstance = transports.get(serviceName);
trInstance.startInstance();
}
/**
* Enables a transport service, identified by subdomain.
*
* @param serviceName name of service to enable.
*/
public void enableService(String serviceName) {
TransportInstance trInstance = transports.get(serviceName);
trInstance.enable();
}
/**
* Disables a transport service, identified by subdomain.
*
* @param serviceName name of service to disable.
*/
public void disableService(String serviceName) {
TransportInstance trInstance = transports.get(serviceName);
trInstance.disable();
}
/**
* Returns the state of a transport service, identified by subdomain.
*
* @param serviceName name of service to check.
* @return True of false if service is enabled.
*/
public Boolean serviceEnabled(String serviceName) {
TransportInstance trInstance = transports.get(serviceName);
return trInstance.isEnabled();
}
/**
* Returns the transport instance, identified by subdomain.
*
* @param serviceName name of service to get instance of.
* @return Instance of service requested.
*/
public TransportInstance getTransportInstance(String serviceName) {
return transports.get(serviceName);
}
/**
* Returns the web options config for the given transport, if it exists.
*
* @param type type of the transport we want the options config for.
* @return XML document with the options config.
*/
public Document getOptionsConfig(TransportType type) {
// Load any custom-defined servlets.
File optConf = new File(this.pluginDirectory, "web" + File.separator + "WEB-INF" +
File.separator + "options" + File.separator + type.toString() + ".xml");
Document optConfXML;
try {
FileReader reader = new FileReader(optConf);
SAXReader xmlReader = new SAXReader();
xmlReader.setEncoding("UTF-8");
optConfXML = xmlReader.read(reader);
}
catch (FileNotFoundException e) {
// Non-existent: Return empty config
optConfXML = DocumentHelper.createDocument();
optConfXML.addElement("optionsconfig");
}
catch (DocumentException e) {
// Bad config: Return empty config
optConfXML = DocumentHelper.createDocument();
optConfXML.addElement("optionsconfig");
}
return optConfXML;
}
}
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006-2007 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.gateway;
/**
* An enumeration for different presence types.
*
* This is combined into a single variable, which is differnet than the
* typical situation of having to determine the status by looking at both
* the presence stanza's type and show fields.
*
* @author Daniel Henninger
*/
public enum PresenceType {
/**
* Available (aka online)
*/
available,
/**
* Away
*/
away,
/**
* XA (extended away)
*/
xa,
/**
* DND (do not disturb)
*/
dnd,
/**
* Chat (free to chat)
*/
chat,
/**
* Unavailable (offline)
*/
unavailable,
/**
* Unknown
*/
unknown
}
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006-2007 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.gateway;
import org.jivesoftware.util.Log;
import org.jivesoftware.util.NotFoundException;
import org.jivesoftware.database.DbConnectionManager;
import java.sql.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.Set;
/**
* Representation of an entire roster associated with a registration id.
*
* @author Daniel Henninger
*/
public class PseudoRoster {
private static final String GET_ALL_USER_ROSTER_ITEMS =
"SELECT username FROM gatewayPseudoRoster WHERE registrationID=?";
private static final String REMOVE_ROSTER_ITEM =
"DELETE FROM gatewayPseudoRoster WHERE registrationID=? AND username=?";
private long registrationID;
private ConcurrentHashMap<String,PseudoRosterItem> pseudoRosterItems = new ConcurrentHashMap<String,PseudoRosterItem>();
/**
* Loads an existing pseudo roster.
*
* @param registrationID The ID of the registration the roster item is assocaited with.
*/
public PseudoRoster(long registrationID) {
this.registrationID = registrationID;
loadFromDb();
}
/**
* Returns the unique ID of the registration associated with the roster.
*
* @return the registration ID.
*/
public long getRegistrationID() {
return registrationID;
}
/**
* Returns the list of roster items associated with this registration ID.
*
* @return Map of roster item usernames to PseudoRosterItems.
*/
public ConcurrentHashMap<String,PseudoRosterItem> getRosterItems() {
return pseudoRosterItems;
}
/**
* Returns a set of just the usernames of contacts from this roster.
*
* @return Set of usernames.
*/
public Set<String> getContacts() {
return pseudoRosterItems.keySet();
}
/**
* Returns true or false if a pseudo roster item exists for a username.
*
* @param username Username to locate.
* @return Whether a roster item exists with the username.
*/
public Boolean hasItem(String username) {
return pseudoRosterItems.containsKey(username);
}
/**
* Retrieves a pseudo roster item for a username.
*
* @param username Username to locate.
* @return A PseudoRosterItem for the user specified.
*/
public PseudoRosterItem getItem(String username) {
return pseudoRosterItems.get(username);
}
/**
* Removes a pseudo roster item for a username.
*
* @param username Username to remove.
*/
public void removeItem(String username) {
Connection con = null;
PreparedStatement pstmt = null;
try {
con = DbConnectionManager.getConnection();
pstmt = con.prepareStatement(REMOVE_ROSTER_ITEM);
pstmt.setLong(1, registrationID);
pstmt.setString(2, username);
pstmt.executeUpdate();
}
catch (SQLException sqle) {
Log.error(sqle);
}
finally {
DbConnectionManager.closeConnection(pstmt, con);
}
}
/**
* Creates a new pseudo roster item for a username, nickname, and list of groups.
*
* @param username Username to add.
* @param nickname Nickname for roster item.
* @param groups List of groups for roster item.
*/
public PseudoRosterItem createItem(String username, String nickname, String groups) {
PseudoRosterItem rosterItem = new PseudoRosterItem(registrationID, username, nickname, groups);
pseudoRosterItems.put(username, rosterItem);
return rosterItem;
}
/**
* Load pseudo roster from database.
*/
private void loadFromDb() {
Connection con = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
con = DbConnectionManager.getConnection();
pstmt = con.prepareStatement(GET_ALL_USER_ROSTER_ITEMS);
pstmt.setLong(1, registrationID);
rs = pstmt.executeQuery();
while (rs.next()) {
String username = rs.getString(1);
try {
pseudoRosterItems.put(username, new PseudoRosterItem(registrationID, username));
}
catch (NotFoundException e) {
Log.error("Could not find pseudo roster item after already having found it.", e);
}
}
}
catch (SQLException sqle) {
Log.error(sqle);
}
finally {
DbConnectionManager.closeConnection(rs, pstmt, con);
}
}
}
/**
* $Revision$
* $Date$
*
* Copyright (C) 2006-2007 Jive Software. All rights reserved.
*
* This software is published under the terms of the GNU Public License (GPL),
* a copy of which is included in this distribution.
*/
package org.jivesoftware.openfire.gateway;
/**
* An enumeration for supported features.
*
* This represents features that the client supports that we have detected and
* can make use of.
*
* @author Daniel Henninger
*/
public enum SupportedFeature {
/**
* Chat States (XEP-0085)
*/
chatstates
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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