mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Username and password are optional in Registration. SMACK-62
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2503 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
8a48d3d11e
commit
2271ca730e
2 changed files with 6 additions and 48 deletions
|
@ -48,47 +48,9 @@ import java.util.Iterator;
|
|||
*/
|
||||
public class Registration extends IQ {
|
||||
|
||||
private String username = null;
|
||||
private String password = null;
|
||||
private String instructions = null;
|
||||
private Map attributes = null;
|
||||
|
||||
/**
|
||||
* Returns the username, or <tt>null</tt> if no username has ben set.
|
||||
*
|
||||
* @return the username.
|
||||
*/
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the username.
|
||||
*
|
||||
* @param username the username.
|
||||
*/
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the password, or <tt>null</tt> if no password has been set.
|
||||
*
|
||||
* @return the password.
|
||||
*/
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the password.
|
||||
*
|
||||
* @param password the password.
|
||||
*/
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the registration instructions, or <tt>null</tt> if no instructions
|
||||
* have been set. If present, instructions should be displayed to the end-user
|
||||
|
@ -130,12 +92,6 @@ public class Registration extends IQ {
|
|||
public String getChildElementXML() {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
buf.append("<query xmlns=\"jabber:iq:register\">");
|
||||
if (username != null) {
|
||||
buf.append("<username>").append(username).append("</username>");
|
||||
}
|
||||
if (password != null) {
|
||||
buf.append("<password>").append(password).append("</password>");
|
||||
}
|
||||
if (instructions != null) {
|
||||
buf.append("<instructions>").append(instructions).append("</instructions>");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue