001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * The contents of this file are subject to the terms of either the GNU
007: * General Public License Version 2 only ("GPL") or the Common
008: * Development and Distribution License("CDDL") (collectively, the
009: * "License"). You may not use this file except in compliance with the
010: * License. You can obtain a copy of the License at
011: * http://www.netbeans.org/cddl-gplv2.html
012: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
013: * specific language governing permissions and limitations under the
014: * License. When distributing the software, include this License Header
015: * Notice in each file and include the License file at
016: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
017: * particular file as subject to the "Classpath" exception as provided
018: * by Sun in the GPL Version 2 section of the License file that
019: * accompanied this code. If applicable, add the following below the
020: * License Header, with the fields enclosed by brackets [] replaced by
021: * your own identifying information:
022: * "Portions Copyrighted [year] [name of copyright owner]"
023: *
024: * Contributor(s):
025: *
026: * The Original Software is NetBeans. The Initial Developer of the Original
027: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
028: * Microsystems, Inc. All Rights Reserved.
029: *
030: * If you wish your version of this file to be governed by only the CDDL
031: * or only the GPL Version 2, indicate your decision by adding
032: * "[Contributor] elects to include this software in this distribution
033: * under the [CDDL or GPL Version 2] license." If you do not indicate a
034: * single choice of license, a recipient has the option to distribute
035: * your version of this file under either the CDDL, the GPL Version 2 or
036: * to extend the choice of license to its licensees as provided above.
037: * However, if you add GPL Version 2 code and therefore, elected the GPL
038: * Version 2 license, then the option applies only if the new code is
039: * made subject to such option by the copyright holder.
040: */
041:
042: package org.netbeans.lib.collab.xmpp.jso.iface.x.muc;
043:
044: import org.jabberstudio.jso.NSI;
045: import org.jabberstudio.jso.StreamElement;
046: import org.jabberstudio.jso.JID;
047:
048: /**
049: *
050: *
051: * @author Rahul Shah
052: *
053: */
054: public interface MUCItem extends StreamElement {
055:
056: public static final String NAME = "item";
057:
058: //Methods
059: /**
060: * <p>
061: * Retrieves the reason from this <tt>MUCItem</tt>.</p>
062: *
063: * <p>
064: * The value returned by this method may be <tt>null</tt> if there is no
065: * <tt>reason</tt> </p>
066: *
067: *
068: * @return The reason of item.
069: */
070: public String getReason();
071:
072: /**
073: * <p>
074: * Adds the reason to this
075: * <tt>MUCItem</tt>. </p>
076: *
077: * The value of <tt>reason</tt> cannot be <tt>null</tt> or an
078: * <tt>IllegalArgumentException</tt> is thrown.</p>
079: *
080: * @param name The reason of MUCItem.
081: * @throws IllegalArgumentException If the parameter is invalid.
082: */
083: public void setReason(String reason)
084: throws IllegalArgumentException;
085:
086: /**
087: * <p>
088: * Retrieves the JID if Actor from this <tt>MUCItem</tt>.</p>
089: *
090: * <p>
091: * The value returned by this method may be <tt>null</tt> if there is no
092: * <tt>actor</tt> </p>
093: *
094: *
095: * @return The JID of the actor element of item.
096: */
097: public JID getActor();
098:
099: /**
100: * <p>
101: * Adds the actor element to this
102: * <tt>MUCItem</tt>. </p>
103: *
104: * The value of <tt>actor</tt> cannot be <tt>null</tt> or an
105: * <tt>IllegalArgumentException</tt> is thrown.</p>
106: *
107: * @param name The JID if the actor of MUCItem.
108: * @throws IllegalArgumentException If the parameter is invalid.
109: */
110: public void setActor(JID actor) throws IllegalArgumentException;
111:
112: /**
113: * <p>
114: * Removes the actor element from this
115: * <tt>MUCItem</tt>. </p>
116: *
117: *
118: */
119: public void removeActor();
120:
121: /**
122: * <p>
123: * Retrieves the Affiliation from this <tt>MUCItem</tt>.</p>
124: *
125: * <p>
126: * The value returned by this method may be <tt>null</tt> if there is no
127: * <tt>Affiliation</tt> </p>
128: *
129: *
130: * @return The affiliation.
131: */
132: public Affiliation.Type getAffiliation();
133:
134: /**
135: * <p>
136: * Adds the affiliation to this
137: * <tt>MUCItem</tt>. </p>
138: *
139: * The value of <tt>type</tt> cannot be <tt>null</tt>, or an
140: * <tt>IllegalArgumentException</tt> is thrown.</p>
141: *
142: * @param type of affiliation.
143: * @throws IllegalArgumentException If the parameter is invalid.
144: */
145: public void setAffiliation(Affiliation.Type type)
146: throws IllegalArgumentException;
147:
148: /**
149: * <p>
150: * Retrieves the jid from this <tt>MUCItem</tt>.</p>
151: *
152: * <p>
153: * The value returned by this method may be <tt>null</tt> if there is no
154: * <tt>jid</tt> </p>
155: *
156: *
157: * @return The jid of item.
158: */
159: public JID getJID();
160:
161: /**
162: * <p>
163: * Sets the jid for this
164: * <tt>MUCItem</tt>. </p>
165: *
166: * The value of <tt>jid</tt> cannot be <tt>null</tt> or an
167: * <tt>IllegalArgumentException</tt> is thrown.</p>
168: *
169: * @param name The jid of MUCItem.
170: * @throws IllegalArgumentException If the parameter is invalid.
171: */
172: public void setJID(JID jid) throws IllegalArgumentException;
173:
174: /**
175: * <p>
176: * Retrieves the nick name from this <tt>MUCItem</tt>.</p>
177: *
178: * <p>
179: * The value returned by this method may be <tt>null</tt> if there is no
180: * <tt>nick name</tt> </p>
181: *
182: *
183: * @return The nick name of item.
184: */
185: public String getNick();
186:
187: /**
188: * <p>
189: * Sets the nick name to this
190: * <tt>MUCItem</tt>. </p>
191: *
192: * The value of <tt>nick name</tt> cannot be <tt>null</tt> or an
193: * <tt>IllegalArgumentException</tt> is thrown.</p>
194: *
195: * @param name The nick name of MUCItem.
196: * @throws IllegalArgumentException If the parameter is invalid.
197: */
198: public void setNick(String nick) throws IllegalArgumentException;
199:
200: /**
201: * <p>
202: * Retrieves the type of Role from this <tt>MUCItem</tt>.</p>
203: *
204: * <p>
205: * The value returned by this method may be <tt>null</tt> if there is no
206: * <tt>Role</tt> </p>
207: *
208: *
209: * @return The role.
210: */
211: public MUCRole.Type getRole();
212:
213: /**
214: * <p>
215: * Sets the type of role for this
216: * <tt>MUCItem</tt>. </p>
217: *
218: * The value of <tt>type</tt> cannot be <tt>null</tt>, or an
219: * <tt>IllegalArgumentException</tt> is thrown.</p>
220: *
221: * @param type of role.
222: * @throws IllegalArgumentException If the parameter is invalid.
223: */
224: public void setRole(MUCRole.Type type)
225: throws IllegalArgumentException;
226: }
|