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.util.Enumerator;
047: import org.jabberstudio.jso.JID;
048:
049: /**
050: *
051: *
052: * @author Rahul Shah
053: *
054: */
055: public interface Invite extends StreamElement {
056:
057: public static final NSI NAME = new NSI("invite",
058: MUCUserQuery.NAMESPACE);
059:
060: /**
061: * <p>
062: * Retrieves the reason from this <tt>Invite</tt>.</p>
063: *
064: * <p>
065: * The value returned by this method may be <tt>null</tt> if there is no
066: * <tt>reason</tt> </p>
067: *
068: *
069: * @return The reason.
070: */
071: public String getReason();
072:
073: /**
074: * <p>
075: * Sets the reason for this
076: * <tt>Invite</tt>. </p>
077: *
078: * The value of <tt>reason</tt> cannot be <tt>null</tt> or an
079: * <tt>IllegalArgumentException</tt> is thrown.</p>
080: *
081: * @param name The reason.
082: * @throws IllegalArgumentException If the parameter is invalid.
083: */
084: public void setReason(String reason)
085: throws IllegalArgumentException;
086:
087: /**
088: * <p>
089: * Sets the continue element
090: * <tt>Invite</tt>. </p>
091: *
092: */
093: public void setContinue();
094:
095: /**
096: * <p>
097: * Determines if the <continue> element is present.
098: * </p>
099: * @return true if the continue element is present
100: */
101: public boolean hasContinue();
102:
103: /**
104: * <p>
105: * Removes <continue> element.
106: * </p>
107: */
108: public void removeContinue();
109:
110: /**
111: * <p>
112: * Retrieves the jid of sender for this <tt>Invite</tt>.</p>
113: *
114: * <p>
115: * The value returned by this method may be <tt>null</tt> if there is no
116: * <tt>jid</tt> of sender</p>
117: *
118: *
119: * @return The jid of sender.
120: */
121: public JID getFrom();
122:
123: /**
124: * <p>
125: * Sets the jid of sender for this
126: * <tt>Invite</tt>. </p>
127: *
128: * The value of <tt>jid</tt> of sender cannot be <tt>null</tt> or an
129: * <tt>IllegalArgumentException</tt> is thrown.</p>
130: *
131: * @param name The jid of sender.
132: * @throws IllegalArgumentException If the parameter is invalid.
133: */
134: public void setFrom(JID jid) throws IllegalArgumentException;
135:
136: /**
137: * <p>
138: * Retrieves the jid of recepient for this <tt>Invite</tt>.</p>
139: *
140: * <p>
141: * The value returned by this method may be <tt>null</tt> if there is no
142: * <tt>jid</tt> of recepient</p>
143: *
144: *
145: * @return The jid of recepient.
146: */
147: public JID getTo();
148:
149: /**
150: * <p>
151: * Sets the jid of recepient for this
152: * <tt>Invite</tt>. </p>
153: *
154: * The value of <tt>jid</tt> of recepient cannot be <tt>null</tt> or an
155: * <tt>IllegalArgumentException</tt> is thrown.</p>
156: *
157: * @param name The jid of recepient.
158: * @throws IllegalArgumentException If the parameter is invalid.
159: */
160: public void setTo(JID jid) throws IllegalArgumentException;
161: }
|