Commit 2a90f667 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Modified to use Generics (in disco).


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@647 b35dd754-fafc-0310-a699-88a17e54d16e
parent 19d55c10
...@@ -13,6 +13,7 @@ package org.jivesoftware.messenger.disco; ...@@ -13,6 +13,7 @@ package org.jivesoftware.messenger.disco;
import org.jivesoftware.messenger.auth.UnauthorizedException; import org.jivesoftware.messenger.auth.UnauthorizedException;
import org.xmpp.packet.JID; import org.xmpp.packet.JID;
import org.dom4j.Element;
import java.util.Iterator; import java.util.Iterator;
...@@ -41,7 +42,7 @@ public interface DiscoItemsProvider { ...@@ -41,7 +42,7 @@ public interface DiscoItemsProvider {
* @return an Iterator (of Element) with the target entity's items or null if none. * @return an Iterator (of Element) with the target entity's items or null if none.
* @throws UnauthorizedException if the senderJID is not authorized to discover items. * @throws UnauthorizedException if the senderJID is not authorized to discover items.
*/ */
public abstract Iterator getItems(String name, String node, JID senderJID) public abstract Iterator<Element> getItems(String name, String node, JID senderJID)
throws UnauthorizedException; throws UnauthorizedException;
} }
...@@ -808,9 +808,9 @@ public class MultiUserChatServerImpl extends BasicModule implements MultiUserCha ...@@ -808,9 +808,9 @@ public class MultiUserChatServerImpl extends BasicModule implements MultiUserCha
return false; return false;
} }
public Iterator getItems(String name, String node, JID senderJID) public Iterator<Element> getItems(String name, String node, JID senderJID)
throws UnauthorizedException { throws UnauthorizedException {
List answer = new ArrayList(); List<Element> answer = new ArrayList<Element>();
if (name == null && node == null) { if (name == null && node == null) {
Element item; Element item;
// Answer all the public rooms as items // Answer all the public rooms as items
......
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