Class RoomRegistration

  • All Implemented Interfaces:
    StandardizedDataForm

    public final class RoomRegistration
    extends Object
    implements StandardizedDataForm
    Represents a standardized DataForm with form type http://jabber.org/protocol/muc#register, which can be used to register with a MUC room.

    Usage

    To wrap an existing DataForm to retrieve standard data from it, use:
    
     RoomRegistration roomRegistration = new RoomRegistration(dataForm);
     
    To build a form:
    
     RoomRegistration roomRegistration = RoomRegistration.builder()
         .allowRegister(true)
         .email("hag66@witchesonline")
         .familyName("Entwhistle-Throckmorton")
         .givenName("Brunhilde")
         .faqEntry("Just another witch.")
         .nickname("thirdwitch")
         .webPage(new URL("http://witchesonline/~hag66/"))
         .build();
     
    See Also:
    7.10 Registering with a Room, 15.5.1 muc#register FORM_TYPE
    • Constructor Detail

      • RoomRegistration

        public RoomRegistration​(DataForm dataForm)
    • Method Detail

      • getEmail

        public String getEmail()
        Gets the e-mail address.
        Returns:
        The e-mail address.
      • getFamilyName

        public String getFamilyName()
        Gets the family name.
        Returns:
        The family name.
      • getGivenName

        public String getGivenName()
        Gets the given name.
        Returns:
        The given name.
      • getRoomNick

        public String getRoomNick()
        Gets the desired room nick.
        Returns:
        The room nick.
      • getWebPage

        public URL getWebPage()
        Gets an URL to a web page.
        Returns:
        The URL.
      • getFaqEntry

        public String getFaqEntry()
        Gets the FAQ entry.
        Returns:
        The FAQ entry.
      • isRegisterAllowed

        public boolean isRegisterAllowed()
        Indicates, whether the registration request is approved.
        Returns:
        True, if the registration request is approved.
      • toBuilder

        public final RoomRegistration.Builder toBuilder()
        Converts this (immutable) data form to a builder, so that a modified form can be created.
        Returns:
        The builder.