Commit 4b6d585c authored by Gabriel Guardincerri's avatar Gabriel Guardincerri Committed by gguardin

[JM-1253] Receives users, groups and vcard changes from CS. Reviewer Daniel Henninger.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@10082 b35dd754-fafc-0310-a699-88a17e54d16e
parent 1ba55ad7
......@@ -15,6 +15,7 @@ import org.jivesoftware.openfire.XMPPServer;
import org.xmpp.packet.JID;
import java.util.List;
import java.util.Map;
/**
* An ad-hoc command is a stateless object responsbile for executing the provided service. Each
......@@ -215,6 +216,16 @@ public abstract class AdHocCommand {
data.setExecuteAction(executeAction);
}
protected String get(Map<String, List<String>> data, String key, int value) {
List<String> list = data.get(key);
if (list == null) {
return null;
} else {
return list.get(value);
}
}
public enum Status {
/**
......
......@@ -8,22 +8,22 @@
*/
package org.jivesoftware.openfire.commands.admin.muc;
import org.dom4j.Element;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.commands.AdHocCommand;
import org.jivesoftware.openfire.commands.SessionData;
import org.jivesoftware.openfire.XMPPServer;
import org.jivesoftware.openfire.muc.MUCRoom;
import org.jivesoftware.openfire.muc.MultiUserChatService;
import org.jivesoftware.openfire.muc.NotAllowedException;
import org.jivesoftware.openfire.muc.MUCRoom;
import org.jivesoftware.util.NotFoundException;
import org.dom4j.Element;
import org.xmpp.packet.JID;
import org.xmpp.forms.DataForm;
import org.xmpp.forms.FormField;
import org.xmpp.packet.JID;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Collection;
import java.util.Arrays;
/**
* Allows via AdHoc commands the creation of a Multi-User Chat room.
......@@ -160,13 +160,4 @@ public class CreateMUCRoom extends AdHocCommand {
return AdHocCommand.Action.complete;
}
private String get(Map<String, List<String>> data, String key, int value) {
List<String> list = data.get(key);
if (list == null) {
return null;
}
else {
return list.get(value);
}
}
}
......@@ -150,16 +150,6 @@ public class AddUser extends AdHocCommand {
command.add(form.getElement());
}
private String get(Map<String, List<String>> data, String key, int value) {
List<String> list = data.get(key);
if (list == null) {
return null;
}
else {
return list.get(value);
}
}
protected List<Action> getActions(SessionData data) {
return Arrays.asList(AdHocCommand.Action.complete);
}
......
......@@ -104,16 +104,6 @@ public class ChangeSharedSecret extends AdHocCommand {
command.add(form.getElement());
}
private String get(Map<String, List<String>> data, String key, int value) {
List<String> list = data.get(key);
if (list == null) {
return null;
}
else {
return list.get(value);
}
}
protected List<Action> getActions(SessionData data) {
return Arrays.asList(Action.complete);
}
......
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