Class Registration
- java.lang.Object
-
- rocks.xmpp.extensions.register.model.Registration
-
public final class Registration extends Object
The implementation of the<query/>
element in thejabber:iq:register
namespace.Usage
To request the registration form:
To create a registration for submission:Registration registration = Registration.empty();
To create a registration for removing the current account:Registration registration = Registration.builder() .username("user") .password("pass") .familyName("Family Name") .givenName("Given Name") .nickname("Nick Name") .email("E-Mail") .build();
This class is immutable.Registration registration = Registration.remove();
- See Also:
- XEP-0077: In-Band Registration, XML Schema
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Registration.Builder
A builder to build a registration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Registration.Builder
builder()
Creates the builder for an registration.static Registration
empty()
Creates an empty registration element for requesting the registration form.String
getCity()
Gets the city.String
getDate()
Gets some date (e.g. birth date, hire date, sign-up date).String
getEmail()
Gets the email street.String
getFullName()
Gets the full name.String
getGivenName()
Gets the given name.String
getInstructions()
Gets the registration instructions.String
getLastName()
Gets the familyName name.String
getNickname()
Gets the nickname.String
getPassword()
Gets the password.String
getPostalCode()
Gets the postal code.String
getRegion()
Gets the region.DataForm
getRegistrationForm()
Gets the extended registration form.String
getStreet()
Gets the street.String
getTelephone()
Gets the telephone number.URL
getUrl()
Gets the URL to a web page.String
getUsername()
Gets the username.URI
getWebRegistrationUri()
Gets the web registration URI, if any.boolean
isRegistered()
Indicates whether the account is already registered.boolean
isRemove()
Indicates whether the account is to be removed.static Registration
remove()
Creates a registration element with an<remove/>
element used to indicate account removal.
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
jabber:iq:register- See Also:
- Constant Field Values
-
-
Method Detail
-
remove
public static Registration remove()
Creates a registration element with an<remove/>
element used to indicate account removal.- Returns:
- The registration.
-
empty
public static Registration empty()
Creates an empty registration element for requesting the registration form.- Returns:
- The registration.
-
builder
public static Registration.Builder builder()
Creates the builder for an registration.- Returns:
- The registration.
-
isRegistered
public boolean isRegistered()
Indicates whether the account is already registered.- Returns:
- True, if the account is already registered.
-
getInstructions
public String getInstructions()
Gets the registration instructions.- Returns:
- The instructions.
-
getUsername
public String getUsername()
Gets the username.- Returns:
- The username.
-
getNickname
public String getNickname()
Gets the nickname.- Returns:
- The nickname.
-
getPassword
public String getPassword()
Gets the password.- Returns:
- The password.
-
getFullName
public String getFullName()
Gets the full name.- Returns:
- The full name.
-
getGivenName
public String getGivenName()
Gets the given name.- Returns:
- The given name.
-
getLastName
public String getLastName()
Gets the familyName name.- Returns:
- The familyName name.
-
getEmail
public String getEmail()
Gets the email street.- Returns:
- The email street.
-
getStreet
public String getStreet()
Gets the street.- Returns:
- The street.
-
getCity
public String getCity()
Gets the city.- Returns:
- The city.
-
getRegion
public String getRegion()
Gets the region.- Returns:
- The region.
-
getPostalCode
public String getPostalCode()
Gets the postal code.- Returns:
- The postal code.
-
getTelephone
public String getTelephone()
Gets the telephone number.- Returns:
- The telephone number.
-
getUrl
public URL getUrl()
Gets the URL to a web page.- Returns:
- The URL.
-
getDate
public String getDate()
Gets some date (e.g. birth date, hire date, sign-up date).- Returns:
- The date.
-
getRegistrationForm
public DataForm getRegistrationForm()
Gets the extended registration form.- Returns:
- The registration form.
-
getWebRegistrationUri
public URI getWebRegistrationUri()
Gets the web registration URI, if any.- Returns:
- The web registration URI or null.
-
isRemove
public boolean isRemove()
Indicates whether the account is to be removed.- Returns:
- True, if the account is to be removed.
-
-