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:registernamespace.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 classRegistration.BuilderA builder to build a registration.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Registration.Builderbuilder()Creates the builder for an registration.static Registrationempty()Creates an empty registration element for requesting the registration form.StringgetCity()Gets the city.StringgetDate()Gets some date (e.g. birth date, hire date, sign-up date).StringgetEmail()Gets the email street.StringgetFullName()Gets the full name.StringgetGivenName()Gets the given name.StringgetInstructions()Gets the registration instructions.StringgetLastName()Gets the familyName name.StringgetNickname()Gets the nickname.StringgetPassword()Gets the password.StringgetPostalCode()Gets the postal code.StringgetRegion()Gets the region.DataFormgetRegistrationForm()Gets the extended registration form.StringgetStreet()Gets the street.StringgetTelephone()Gets the telephone number.URLgetUrl()Gets the URL to a web page.StringgetUsername()Gets the username.URIgetWebRegistrationUri()Gets the web registration URI, if any.booleanisRegistered()Indicates whether the account is already registered.booleanisRemove()Indicates whether the account is to be removed.static Registrationremove()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.
-
-