Commit c86da893 authored by Holger Bergunde's avatar Holger Bergunde Committed by holger.bergunde

OF-490 added Log.debug() for debugging

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@12901 b35dd754-fafc-0310-a699-88a17e54d16e
parent 31b70147
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
<name>Remote Roster</name> <name>Remote Roster</name>
<description>ProtoXEP-xxxx: Remote Roster Management support</description> <description>ProtoXEP-xxxx: Remote Roster Management support</description>
<author>Daniel Henninger</author> <author>Holger Bergunde & Daniel Henninger</author>
<version>1.0.0</version> <version>1.0.0 Alpha</version>
<date>10/16/2011</date> <date>12/01/2011</date>
<minServerVersion>3.7.0</minServerVersion> <minServerVersion>3.7.0</minServerVersion>
<!-- Admin console entries --> <!-- Admin console entries -->
......
...@@ -21,17 +21,18 @@ import org.xmpp.packet.Packet; ...@@ -21,17 +21,18 @@ import org.xmpp.packet.Packet;
public class RemotePackageInterceptor implements PacketInterceptor { public class RemotePackageInterceptor implements PacketInterceptor {
private static final Logger Log = LoggerFactory.getLogger(RemoteRosterPlugin.class); private static final Logger Log = LoggerFactory.getLogger(RemotePackageInterceptor.class);
private String _mySubdomain; private String _mySubdomain;
private Map<String, AbstractRemoteRosterProcessor> _packetProcessor = new HashMap<String, AbstractRemoteRosterProcessor>(); private Map<String, AbstractRemoteRosterProcessor> _packetProcessor = new HashMap<String, AbstractRemoteRosterProcessor>();
public RemotePackageInterceptor(String initialSubdomain) { public RemotePackageInterceptor(String initialSubdomain) {
Log.debug("Starting Package Interceptor for "+initialSubdomain);
_mySubdomain = initialSubdomain; _mySubdomain = initialSubdomain;
XMPPServer server = XMPPServer.getInstance(); XMPPServer server = XMPPServer.getInstance();
RosterManager rosterMananger = server.getRosterManager(); RosterManager rosterMananger = server.getRosterManager();
AbstractRemoteRosterProcessor sendroster = new SendRosterProcessor(rosterMananger, _mySubdomain); AbstractRemoteRosterProcessor sendroster = new SendRosterProcessor(rosterMananger, _mySubdomain);
AbstractRemoteRosterProcessor receiveChanges = new ReceiveComponentUpdatesProcessor(rosterMananger); AbstractRemoteRosterProcessor receiveChanges = new ReceiveComponentUpdatesProcessor(rosterMananger, _mySubdomain);
AbstractRemoteRosterProcessor iqRegistered = new DiscoIQResigteredProcessor(_mySubdomain); AbstractRemoteRosterProcessor iqRegistered = new DiscoIQResigteredProcessor(_mySubdomain);
AbstractRemoteRosterProcessor cleanUp = new CleanUpRosterProcessor(rosterMananger, _mySubdomain); AbstractRemoteRosterProcessor cleanUp = new CleanUpRosterProcessor(rosterMananger, _mySubdomain);
AbstractRemoteRosterProcessor updateToComponent = new ClientToComponentUpdateProcessor(_mySubdomain); AbstractRemoteRosterProcessor updateToComponent = new ClientToComponentUpdateProcessor(_mySubdomain);
...@@ -48,6 +49,7 @@ public class RemotePackageInterceptor implements PacketInterceptor { ...@@ -48,6 +49,7 @@ public class RemotePackageInterceptor implements PacketInterceptor {
{ {
if (!processed && incoming) { if (!processed && incoming) {
if (packet instanceof IQ) { if (packet instanceof IQ) {
Log.debug("Incomping unprocessed package i might be interested in. Package: \n"+packet.toString()+"\n");
IQ myPacket = (IQ) packet; IQ myPacket = (IQ) packet;
if (myPacket.getFrom() == null || myPacket.getTo() == null) { if (myPacket.getFrom() == null || myPacket.getTo() == null) {
/* /*
...@@ -63,6 +65,7 @@ public class RemotePackageInterceptor implements PacketInterceptor { ...@@ -63,6 +65,7 @@ public class RemotePackageInterceptor implements PacketInterceptor {
} }
return; return;
} }
@SuppressWarnings("unused")
String to = myPacket.getTo().toString(); String to = myPacket.getTo().toString();
String from = myPacket.getFrom().toString(); String from = myPacket.getFrom().toString();
......
...@@ -20,12 +20,14 @@ import org.jivesoftware.openfire.session.ComponentSession; ...@@ -20,12 +20,14 @@ import org.jivesoftware.openfire.session.ComponentSession;
import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.util.JiveGlobals;
import org.jivesoftware.util.PropertyEventDispatcher; import org.jivesoftware.util.PropertyEventDispatcher;
import org.jivesoftware.util.PropertyEventListener; import org.jivesoftware.util.PropertyEventListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xmpp.packet.IQ; import org.xmpp.packet.IQ;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
public class RemoteRosterPlugin implements Plugin { public class RemoteRosterPlugin implements Plugin {
// private static final Logger Log = LoggerFactory.getLogger(RemoteRosterPlugin.class); private static final Logger Log = LoggerFactory.getLogger(RemoteRosterPlugin.class);
final SessionManager _sessionManager = SessionManager.getInstance(); final SessionManager _sessionManager = SessionManager.getInstance();
private Map<String, RemotePackageInterceptor> _interceptors = new HashMap<String, RemotePackageInterceptor>(); private Map<String, RemotePackageInterceptor> _interceptors = new HashMap<String, RemotePackageInterceptor>();
private static PluginManager pluginManager; private static PluginManager pluginManager;
...@@ -40,6 +42,7 @@ public class RemoteRosterPlugin implements Plugin { ...@@ -40,6 +42,7 @@ public class RemoteRosterPlugin implements Plugin {
public void initializePlugin(PluginManager manager, File pluginDirectory) public void initializePlugin(PluginManager manager, File pluginDirectory)
{ {
Log.debug("Starting RemoteRoster Plguin");
pluginManager = manager; pluginManager = manager;
manageExternalComponents(); manageExternalComponents();
listenToSettings(); listenToSettings();
...@@ -127,6 +130,7 @@ public class RemoteRosterPlugin implements Plugin { ...@@ -127,6 +130,7 @@ public class RemoteRosterPlugin implements Plugin {
private void updateInterceptors(String componentJID) private void updateInterceptors(String componentJID)
{ {
Log.debug("Updating my package interceptors for component "+componentJID);
boolean allowed = JiveGlobals.getBooleanProperty("plugin.remoteroster.jids."+componentJID, false); boolean allowed = JiveGlobals.getBooleanProperty("plugin.remoteroster.jids."+componentJID, false);
if (allowed) if (allowed)
{ {
...@@ -158,6 +162,7 @@ public class RemoteRosterPlugin implements Plugin { ...@@ -158,6 +162,7 @@ public class RemoteRosterPlugin implements Plugin {
{ {
RemotePackageInterceptor interceptor = _interceptors.get(initialSubdomain); RemotePackageInterceptor interceptor = _interceptors.get(initialSubdomain);
if (interceptor != null) { if (interceptor != null) {
Log.debug("Removing package interceptor for "+initialSubdomain);
_interceptorManager.removeInterceptor(interceptor); _interceptorManager.removeInterceptor(interceptor);
_interceptors.remove(initialSubdomain); _interceptors.remove(initialSubdomain);
} }
...@@ -165,6 +170,7 @@ public class RemoteRosterPlugin implements Plugin { ...@@ -165,6 +170,7 @@ public class RemoteRosterPlugin implements Plugin {
private void createNewPackageIntercetor(String initialSubdomain) private void createNewPackageIntercetor(String initialSubdomain)
{ {
Log.debug("Creating package interceptor.");
RemotePackageInterceptor interceptor = new RemotePackageInterceptor(initialSubdomain); RemotePackageInterceptor interceptor = new RemotePackageInterceptor(initialSubdomain);
_interceptors.put(initialSubdomain, interceptor); _interceptors.put(initialSubdomain, interceptor);
_interceptorManager.addInterceptor(interceptor); _interceptorManager.addInterceptor(interceptor);
......
...@@ -8,10 +8,13 @@ import org.jivesoftware.openfire.PacketRouter; ...@@ -8,10 +8,13 @@ import org.jivesoftware.openfire.PacketRouter;
import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.interceptor.PacketRejectedException; import org.jivesoftware.openfire.interceptor.PacketRejectedException;
import org.jivesoftware.openfire.plugin.Utils; import org.jivesoftware.openfire.plugin.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xmpp.packet.Packet; import org.xmpp.packet.Packet;
abstract public class AbstractRemoteRosterProcessor { abstract public class AbstractRemoteRosterProcessor {
protected static final Logger Log = LoggerFactory.getLogger(AbstractRemoteRosterProcessor.class);
XMPPServer _server; XMPPServer _server;
PacketRouter _router; PacketRouter _router;
...@@ -24,6 +27,7 @@ abstract public class AbstractRemoteRosterProcessor { ...@@ -24,6 +27,7 @@ abstract public class AbstractRemoteRosterProcessor {
protected void dispatchPacket(Packet packet) protected void dispatchPacket(Packet packet)
{ {
Log.debug("Sending package to PacketRouter: \n"+packet.toString()+"\n");
PacketRouter router = _server.getPacketRouter(); PacketRouter router = _server.getPacketRouter();
router.route(packet); router.route(packet);
} }
......
...@@ -11,55 +11,40 @@ import org.xmpp.packet.Presence; ...@@ -11,55 +11,40 @@ import org.xmpp.packet.Presence;
public class CleanUpRosterProcessor extends AbstractRemoteRosterProcessor { public class CleanUpRosterProcessor extends AbstractRemoteRosterProcessor {
private RosterManager _rosterManager; private RosterManager _rosterManager;
private String _subDomain; private String _subDomain;
public CleanUpRosterProcessor(RosterManager rostermananger, String subdomain) { public CleanUpRosterProcessor(RosterManager rostermananger, String subdomain) {
Log.debug("Createt CleanUpRosterProcessor for "+subdomain);
_rosterManager = rostermananger; _rosterManager = rostermananger;
_subDomain = subdomain; _subDomain = subdomain;
} }
@Override @Override
public void process(Packet packet) throws PacketRejectedException public void process(Packet packet) throws PacketRejectedException
{ {
// System.out.println("hab hier was ne oder was"); Log.debug("Processing packet in CleanUpRosterProcessor for "+_subDomain);
Presence myPacket = (Presence) packet; Presence myPacket = (Presence) packet;
String to = myPacket.getTo().toString(); String to = myPacket.getTo().toString();
String username = getUsernameFromJid(to); String username = getUsernameFromJid(to);
//<presence id="19nTS-48" to="xmpp.dew08299" type="unavailable"/ if (myPacket.getType() != null && myPacket.getType().equals(Presence.Type.unavailable)) {
if (myPacket.getType() != null && myPacket.getType().equals(Presence.Type.unavailable))
{
System.out.println("is unavaibale ------------");
try { try {
Roster roster = _rosterManager.getRoster(username); Roster roster = _rosterManager.getRoster(username);
Collection <RosterItem> items = roster.getRosterItems(); Collection<RosterItem> items = roster.getRosterItems();
for (RosterItem item: items) for (RosterItem item : items) {
{
String itemName = item.getJid().toString(); String itemName = item.getJid().toString();
System.out.println("NAME: "+itemName+ " sub: "+_subDomain); if (itemName.contains(_subDomain) && !itemName.equals(_subDomain)) {
if (itemName.contains(_subDomain) && !itemName.equals(_subDomain)) Log.debug("Removing contact "+item.getJid().toString()+" from contact list.");
{
System.out.println("entferne "+itemName);
roster.deleteRosterItem(item.getJid(), false); roster.deleteRosterItem(item.getJid(), false);
} }
} }
} catch (Exception e) { } catch (Exception e) {
System.out.println("hier lief was falsch"); Log.debug("Execption occured when cleaning up the Roster.",e);
e.printStackTrace(); e.printStackTrace();
} }
} }
} }
......
...@@ -9,14 +9,15 @@ import org.xmpp.packet.Packet; ...@@ -9,14 +9,15 @@ import org.xmpp.packet.Packet;
public class ClientToComponentUpdateProcessor extends AbstractRemoteRosterProcessor { public class ClientToComponentUpdateProcessor extends AbstractRemoteRosterProcessor {
private String _myDomain; private String _myDomain;
public ClientToComponentUpdateProcessor(String mySubdomain) { public ClientToComponentUpdateProcessor(String mySubdomain) {
Log.debug("Createt ClientToComponentUpdateProcessor for "+mySubdomain);
_myDomain = mySubdomain; _myDomain = mySubdomain;
} }
@Override @Override
public void process(Packet packet) throws PacketRejectedException public void process(Packet packet) throws PacketRejectedException
{ {
Log.debug("Processing packet in ClientToComponentUpdateProcessor for "+_myDomain);
Element query = ((IQ) packet).getChildElement(); Element query = ((IQ) packet).getChildElement();
if (query != null && query.getNamespaceURI().equals("jabber:iq:roster")) { if (query != null && query.getNamespaceURI().equals("jabber:iq:roster")) {
if (findNodesInDocument(query.getDocument(), "//roster:item").size() > 0) { if (findNodesInDocument(query.getDocument(), "//roster:item").size() > 0) {
...@@ -26,6 +27,7 @@ public class ClientToComponentUpdateProcessor extends AbstractRemoteRosterProces ...@@ -26,6 +27,7 @@ public class ClientToComponentUpdateProcessor extends AbstractRemoteRosterProces
// conflicts // conflicts
// when we remove our legacy network registration. // when we remove our legacy network registration.
if (jid.contains("@" + _myDomain) && !n.valueOf("@subscription").equals("remove")) { if (jid.contains("@" + _myDomain) && !n.valueOf("@subscription").equals("remove")) {
Log.debug("Mirroring packet from local network to legacy component "+_myDomain);
IQ forward = (IQ) packet.createCopy(); IQ forward = (IQ) packet.createCopy();
forward.setTo(_myDomain); forward.setTo(_myDomain);
dispatchPacket(forward); dispatchPacket(forward);
......
...@@ -21,16 +21,18 @@ public class DiscoIQResigteredProcessor extends AbstractRemoteRosterProcessor { ...@@ -21,16 +21,18 @@ public class DiscoIQResigteredProcessor extends AbstractRemoteRosterProcessor {
private String _mySubdoman; private String _mySubdoman;
public DiscoIQResigteredProcessor(String subdomain) { public DiscoIQResigteredProcessor(String subdomain) {
Log.debug("Createt DiscoIQResigteredProcessor for " + subdomain);
_mySubdoman = subdomain; _mySubdoman = subdomain;
} }
@Override @Override
public void process(Packet packet) throws PacketRejectedException public void process(Packet packet) throws PacketRejectedException
{ {
//Check if the jabber:iq:register is enabled in admin panel Log.debug("Processing packet in DiscoIQResigteredProcessor for "+_mySubdoman);
// Check if the jabber:iq:register is enabled in admin panel
boolean isFeatureEnabled = JiveGlobals.getBooleanProperty("plugin.remoteroster.sparkDiscoInfo", false); boolean isFeatureEnabled = JiveGlobals.getBooleanProperty("plugin.remoteroster.sparkDiscoInfo", false);
if (!isFeatureEnabled) if (!isFeatureEnabled) {
{ Log.debug("Spark extension is deactivated. Won't change the disco#info");
return; return;
} }
...@@ -39,7 +41,6 @@ public class DiscoIQResigteredProcessor extends AbstractRemoteRosterProcessor { ...@@ -39,7 +41,6 @@ public class DiscoIQResigteredProcessor extends AbstractRemoteRosterProcessor {
final InterceptorManager interceptorManager = InterceptorManager.getInstance(); final InterceptorManager interceptorManager = InterceptorManager.getInstance();
final PacketInterceptor interceptor = new PacketInterceptor() { final PacketInterceptor interceptor = new PacketInterceptor() {
@Override @Override
public void interceptPacket(Packet packet, Session session, boolean incoming, boolean processed) public void interceptPacket(Packet packet, Session session, boolean incoming, boolean processed)
throws PacketRejectedException throws PacketRejectedException
...@@ -60,20 +61,23 @@ public class DiscoIQResigteredProcessor extends AbstractRemoteRosterProcessor { ...@@ -60,20 +61,23 @@ public class DiscoIQResigteredProcessor extends AbstractRemoteRosterProcessor {
&& ns.equals("http://jabber.org/protocol/disco#info") && ns.equals("http://jabber.org/protocol/disco#info")
&& iqPacket.getFrom().toString().equals(_mySubdoman)) { && iqPacket.getFrom().toString().equals(_mySubdoman)) {
// This is the answer of the disco#info from spark /*
// to our component. * This is the answer of the disco#info from spark
// add the jabber:iq:register feature if we are * to our component. add the jabber:iq:register
// registered * feature if we are registered
*/
if (isRegistered()) { if (isRegistered()) {
Log.debug("Modifying disco#info packge to send registered iq feature to Spark user "+iqPacket.getTo().toString());
Attribute attribut = new DefaultAttribute("var", "jabber:iq:registered"); Attribute attribut = new DefaultAttribute("var", "jabber:iq:registered");
iqPacket.getChildElement().addElement("feature").add(attribut); iqPacket.getChildElement().addElement("feature").add(attribut);
} }
} }
} }
} }
} }
}; };
Log.debug("Creating my own listener for jabber:iq:register result to external component "+_mySubdoman);
interceptorManager.addInterceptor(interceptor); interceptorManager.addInterceptor(interceptor);
IQ askComponent = new IQ(); IQ askComponent = new IQ();
...@@ -84,21 +88,21 @@ public class DiscoIQResigteredProcessor extends AbstractRemoteRosterProcessor { ...@@ -84,21 +88,21 @@ public class DiscoIQResigteredProcessor extends AbstractRemoteRosterProcessor {
query.addNamespace("", "jabber:iq:register"); query.addNamespace("", "jabber:iq:register");
askComponent.setChildElement(query); askComponent.setChildElement(query);
// Remove the package intercepter in 1sec
//Remove the package intercepter in 1sec
TimerTask removeInterceptorTask = new TimerTask() { TimerTask removeInterceptorTask = new TimerTask() {
@Override @Override
public void run() public void run()
{ {
Log.debug("Removing my created listener for jabber:iq:register. Component "+_mySubdoman);
interceptorManager.removeInterceptor(interceptor); interceptorManager.removeInterceptor(interceptor);
} }
}; };
Timer timer = new Timer(); Timer timer = new Timer();
timer.schedule(removeInterceptorTask, 1000); timer.schedule(removeInterceptorTask, 1000);
//Send the register query to component // Send the register query to component
dispatchPacket(askComponent); dispatchPacket(askComponent);
} }
......
...@@ -16,15 +16,18 @@ import org.xmpp.packet.Packet; ...@@ -16,15 +16,18 @@ import org.xmpp.packet.Packet;
public class ReceiveComponentUpdatesProcessor extends AbstractRemoteRosterProcessor{ public class ReceiveComponentUpdatesProcessor extends AbstractRemoteRosterProcessor{
private RosterManager _rosterManager; private RosterManager _rosterManager;
private String _mySubdomain;
public ReceiveComponentUpdatesProcessor(RosterManager rosterManager) { public ReceiveComponentUpdatesProcessor(RosterManager rosterManager, String subdomain) {
_mySubdomain = subdomain;
Log.debug("Createt ReceiveComponentUpdatesProcessor for "+_mySubdomain);
_rosterManager = rosterManager; _rosterManager = rosterManager;
} }
@Override @Override
public void process(Packet packet) throws PacketRejectedException public void process(Packet packet) throws PacketRejectedException
{ {
Log.debug("Processing packet in ClientToComponentUpdateProcessor for "+_mySubdomain);
IQ myPacket = (IQ) packet; IQ myPacket = (IQ) packet;
String to = myPacket.getTo().toString(); String to = myPacket.getTo().toString();
String username = getUsernameFromJid(to); String username = getUsernameFromJid(to);
...@@ -49,14 +52,13 @@ public class ReceiveComponentUpdatesProcessor extends AbstractRemoteRosterProces ...@@ -49,14 +52,13 @@ public class ReceiveComponentUpdatesProcessor extends AbstractRemoteRosterProces
grouplist.add(groupName); grouplist.add(groupName);
} }
boolean rosterPersisten = JiveGlobals.getBooleanProperty("plugin.remoteroster.persistent", true); boolean rosterPersisten = JiveGlobals.getBooleanProperty("plugin.remoteroster.persistent", true);
// System.out.println("fge item hinzu: "+jid+" mit gruppen: "+grouplist.toString()); Log.debug("Adding user "+jid+" to roster "+ to);
RosterItem item = roster.createRosterItem(new JID(jid), name, grouplist, false, rosterPersisten); RosterItem item = roster.createRosterItem(new JID(jid), name, grouplist, false, rosterPersisten);
//RosterItem getThat = roster.getRosterItem(new JID(jid));
item.setSubStatus(RosterItem.SUB_BOTH); item.setSubStatus(RosterItem.SUB_BOTH);
roster.updateRosterItem(item); roster.updateRosterItem(item);
} catch (Exception e) { } catch (Exception e) {
Log.debug("Could not add user to Roster "+username,e);
e.printStackTrace(); e.printStackTrace();
System.out.println("Exception beim hinzufuegen eines Konaktes!");
} }
} }
} }
......
...@@ -19,6 +19,7 @@ public class SendRosterProcessor extends AbstractRemoteRosterProcessor { ...@@ -19,6 +19,7 @@ public class SendRosterProcessor extends AbstractRemoteRosterProcessor {
private String _componentName; private String _componentName;
public SendRosterProcessor(RosterManager rosterMananger, String componentName) { public SendRosterProcessor(RosterManager rosterMananger, String componentName) {
Log.debug("Createt SendRosterProcessor for "+componentName);
_rosterManager = rosterMananger; _rosterManager = rosterMananger;
_componentName = componentName; _componentName = componentName;
} }
...@@ -26,10 +27,11 @@ public class SendRosterProcessor extends AbstractRemoteRosterProcessor { ...@@ -26,10 +27,11 @@ public class SendRosterProcessor extends AbstractRemoteRosterProcessor {
@Override @Override
public void process(Packet packet) throws PacketRejectedException public void process(Packet packet) throws PacketRejectedException
{ {
Log.debug("Processing packet in SendRosterProcessor for "+_componentName);
IQ myPacket = (IQ) packet; IQ myPacket = (IQ) packet;
String to = myPacket.getFrom().toString(); String from = myPacket.getFrom().toString();
String username = getUsernameFromJid(to); String username = getUsernameFromJid(from);
Roster roster; Roster roster;
try { try {
...@@ -43,13 +45,14 @@ public class SendRosterProcessor extends AbstractRemoteRosterProcessor { ...@@ -43,13 +45,14 @@ public class SendRosterProcessor extends AbstractRemoteRosterProcessor {
private void sendRosterToComponent(Packet requestPacket, Collection<RosterItem> items) private void sendRosterToComponent(Packet requestPacket, Collection<RosterItem> items)
{ {
Log.debug("Sending contacts from user "+requestPacket.getFrom().toString()+" to external Component");
IQ iq = (IQ) requestPacket; IQ iq = (IQ) requestPacket;
IQ response = IQ.createResultIQ(iq); IQ response = IQ.createResultIQ(iq);
response.setTo(_componentName); response.setTo(_componentName);
Element query = new DefaultElement("query"); Element query = new DefaultElement("query");
for (RosterItem i : items) { for (RosterItem i : items) {
if (i.getJid().toString().contains(_componentName)) { if (i.getJid().toString().contains(_componentName)) {
System.out.println("roster exchange: habe: "+i.getJid().toString()); Log.debug("Roster exchange for external component "+_componentName+". Sending user "+i.getJid().toString());
Element item = new DefaultElement("item"); Element item = new DefaultElement("item");
item.add(new DefaultAttribute("jid", i.getJid().toString())); item.add(new DefaultAttribute("jid", i.getJid().toString()));
item.add(new DefaultAttribute("name", i.getNickname())); item.add(new DefaultAttribute("name", i.getNickname()));
...@@ -64,7 +67,6 @@ public class SendRosterProcessor extends AbstractRemoteRosterProcessor { ...@@ -64,7 +67,6 @@ public class SendRosterProcessor extends AbstractRemoteRosterProcessor {
} }
query.addNamespace("", "jabber:iq:roster"); query.addNamespace("", "jabber:iq:roster");
response.setChildElement(query); response.setChildElement(query);
System.out.println("sende response: "+response.toString());
dispatchPacket(response); dispatchPacket(response);
} }
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
webManager.init(request, response, session, application, out); webManager.init(request, response, session, application, out);
boolean save = request.getParameter("save") != null; boolean save = request.getParameter("save") != null;
boolean success = request.getParameter("success") != null; boolean success = request.getParameter("success") != null;
boolean persistentRoster = ParamUtils.getBooleanAttribute(request, "persistentEnabled"); //boolean persistentRoster = ParamUtils.getBooleanAttribute(request, "persistentEnabled");
boolean persistentRoster = true;
String sparkdiscoParam = request.getParameter("sparkDiscoInfo"); String sparkdiscoParam = request.getParameter("sparkDiscoInfo");
boolean sparkDiscoInfo = sparkdiscoParam == null? false: sparkdiscoParam.equals("true"); boolean sparkDiscoInfo = sparkdiscoParam == null? false: sparkdiscoParam.equals("true");
String[] componentsEnabled = request.getParameterValues("enabledComponents[]"); String[] componentsEnabled = request.getParameterValues("enabledComponents[]");
...@@ -121,7 +122,8 @@ ...@@ -121,7 +122,8 @@
} }
%> %>
</div> </div>
<!-- DISABLED PERSISTENT ROSTER UNTIL SPECTRUM SUPPORTS IT
<div class="jive-contentBoxHeader">Options</div> <div class="jive-contentBoxHeader">Options</div>
<div class="jive-contentBox"> <div class="jive-contentBox">
<table cellpadding="3" cellspacing="0" border="0" width="100%"> <table cellpadding="3" cellspacing="0" border="0" width="100%">
...@@ -153,7 +155,7 @@ ...@@ -153,7 +155,7 @@
</table> </table>
</div> </div>
-->
<div class="jive-contentBoxHeader">Client specific options</div> <div class="jive-contentBoxHeader">Client specific options</div>
<div class="jive-contentBox"> <div class="jive-contentBox">
......
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