Class Registration


  • public final class Registration
    extends Object
    The implementation of the <query/> element in the jabber:iq:register namespace.

    Usage

    To request the registration form:
    
     Registration registration = Registration.empty();
     
    To create a registration for submission:
    
     Registration registration = Registration.builder()
         .username("user")
         .password("pass")
         .familyName("Family Name")
         .givenName("Given Name")
         .nickname("Nick Name")
         .email("E-Mail")
         .build();
     
    To create a registration for removing the current account:
    
     Registration registration = Registration.remove();
     
    This class is immutable.
    See Also:
    XEP-0077: In-Band Registration, XML Schema
    • 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.