From 00ffca04db58277571601e5f455c2409b3b70977 Mon Sep 17 00:00:00 2001 From: Gaston Dombiak Date: Mon, 5 Apr 2004 16:21:56 +0000 Subject: [PATCH] Adds class and methods comments git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2273 b35dd754-fafc-0310-a699-88a17e54d16e --- .../jivesoftware/smackx/packet/MUCOwner.java | 56 ++++++++++++++++--- 1 file changed, 48 insertions(+), 8 deletions(-) diff --git a/source/org/jivesoftware/smackx/packet/MUCOwner.java b/source/org/jivesoftware/smackx/packet/MUCOwner.java index 87fbb6f0c..e66b2e312 100644 --- a/source/org/jivesoftware/smackx/packet/MUCOwner.java +++ b/source/org/jivesoftware/smackx/packet/MUCOwner.java @@ -56,7 +56,9 @@ import java.util.*; import org.jivesoftware.smack.packet.IQ; /** - * Represents ..... + * IQ packet that serves for granting and revoking ownership privileges, granting + * and revoking administrative privileges and destroying a room. All these operations + * are scoped by the 'http://jabber.org/protocol/muc#owner' namespace. * * @author Gaston Dombiak */ @@ -65,20 +67,46 @@ public class MUCOwner extends IQ { private List items = new ArrayList(); private Destroy destroy; + /** + * Returns an Iterator for item childs that holds information about affiliation, + * jids and nicks. + * + * @return an Iterator for item childs that holds information about affiliation, + * jids and nicks. + */ public Iterator getItems() { synchronized (items) { return Collections.unmodifiableList(new ArrayList(items)).iterator(); } } + /** + * Returns a request to the server to destroy a room. The sender of the request + * should be the room's owner. If the sender of the destroy request is not the room's owner + * then the server will answer a "Forbidden" error. + * + * @return a request to the server to destroy a room. + */ public Destroy getDestroy() { return destroy; } + /** + * Sets a request to the server to destroy a room. The sender of the request + * should be the room's owner. If the sender of the destroy request is not the room's owner + * then the server will answer a "Forbidden" error. + * + * @param destroy the request to the server to destroy a room. + */ public void setDestroy(Destroy destroy) { this.destroy = destroy; } + /** + * Adds an item child that holds information about affiliation, jids and nicks. + * + * @param item the item child that holds information about affiliation, jids and nicks. + */ public void addItem(Item item) { synchronized (items) { items.add(item); @@ -104,15 +132,12 @@ public class MUCOwner extends IQ { } /** - * * Item child that holds information about affiliation, jids and nicks. * * @author Gaston Dombiak */ public static class Item { - // TODO repasar si los comentarios estan OK porque son copy&paste - private String actor; private String reason; private String affiliation; @@ -247,34 +272,49 @@ public class MUCOwner extends IQ { } }; + /** + * Represents a request to the server to destroy a room. The sender of the request + * should be the room's owner. If the sender of the destroy request is not the room's owner + * then the server will answer a "Forbidden" error. + * + * @author Gaston Dombiak + */ public static class Destroy { private String reason; private String jid; /** - * @return + * Returns the JID of an alternate location since the current room is being destroyed. + * + * @return the JID of an alternate location. */ public String getJid() { return jid; } /** - * @return + * Returns the reason for the room destruction. + * + * @return the reason for the room destruction. */ public String getReason() { return reason; } /** - * @param jid + * Sets the JID of an alternate location since the current room is being destroyed. + * + * @param jid the JID of an alternate location. */ public void setJid(String jid) { this.jid = jid; } /** - * @param reason + * Sets the reason for the room destruction. + * + * @param reason the reason for the room destruction. */ public void setReason(String reason) { this.reason = reason;