mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +02:00
Added support for registration instructions (SMACK-90)
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2108 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
1ba31fd633
commit
ac2166a62f
2 changed files with 47 additions and 1 deletions
|
@ -82,6 +82,7 @@ public class Registration extends IQ {
|
|||
|
||||
private String username = null;
|
||||
private String password = null;
|
||||
private String instructions = null;
|
||||
private Map attributes = null;
|
||||
|
||||
/**
|
||||
|
@ -120,6 +121,26 @@ public class Registration extends IQ {
|
|||
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
|
||||
* that will complete the registration process.
|
||||
*
|
||||
* @return the registration instructions, or <tt>null</tt> if there are none.
|
||||
*/
|
||||
public String getInstructions() {
|
||||
return instructions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the registration instructions.
|
||||
*
|
||||
* @param instructions the registration instructions.
|
||||
*/
|
||||
public void setInstructions(String instructions) {
|
||||
this.instructions = instructions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the map of String key/value pairs of account attributes.
|
||||
*
|
||||
|
@ -147,6 +168,9 @@ public class Registration extends IQ {
|
|||
if (password != null) {
|
||||
buf.append("<password>").append(password).append("</password>");
|
||||
}
|
||||
if (instructions != null) {
|
||||
buf.append("<instructions>").append(instructions).append("</instructions>");
|
||||
}
|
||||
if (attributes != null && attributes.size() > 0) {
|
||||
Iterator fieldNames = attributes.keySet().iterator();
|
||||
while (fieldNames.hasNext()) {
|
||||
|
@ -160,4 +184,4 @@ public class Registration extends IQ {
|
|||
buf.append("</query>");
|
||||
return buf.toString();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue