Package rocks.xmpp.extensions.muc.model
Class RoomRegistration
- java.lang.Object
-
- rocks.xmpp.extensions.muc.model.RoomRegistration
-
- All Implemented Interfaces:
StandardizedDataForm
public final class RoomRegistration extends Object implements StandardizedDataForm
Represents a standardizedDataForm
with form typehttp://jabber.org/protocol/muc#register
, which can be used to register with a MUC room.Usage
To wrap an existingDataForm
to retrieve standard data from it, use:
To build a form:RoomRegistration roomRegistration = new RoomRegistration(dataForm);
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();
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RoomRegistration.Builder
A builder to build MUC registration forms.
-
Constructor Summary
Constructors Constructor Description RoomRegistration(DataForm dataForm)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RoomRegistration.Builder
builder()
DataForm
getDataForm()
Gets the underlying data form.String
getEmail()
Gets the e-mail address.String
getFamilyName()
Gets the family name.String
getFaqEntry()
Gets the FAQ entry.String
getFormType()
Gets the form type of the data form.String
getGivenName()
Gets the given name.String
getRoomNick()
Gets the desired room nick.URL
getWebPage()
Gets an URL to a web page.boolean
isRegisterAllowed()
Indicates, whether the registration request is approved.RoomRegistration.Builder
toBuilder()
Converts this (immutable) data form to a builder, so that a modified form can be created.
-
-
-
Constructor Detail
-
RoomRegistration
public RoomRegistration(DataForm dataForm)
-
-
Method Detail
-
builder
public static RoomRegistration.Builder builder()
-
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.
-
getFormType
public final String getFormType()
Description copied from interface:StandardizedDataForm
Gets the form type of the data form.- Specified by:
getFormType
in interfaceStandardizedDataForm
- Returns:
- The form type.
-
getDataForm
public final DataForm getDataForm()
Gets the underlying data form.- Specified by:
getDataForm
in interfaceStandardizedDataForm
- Returns:
- The underlying data form.
-
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.
-
-