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 standardizedDataFormwith form typehttp://jabber.org/protocol/muc#register, which can be used to register with a MUC room.Usage
To wrap an existingDataFormto 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 classRoomRegistration.BuilderA 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.Builderbuilder()DataFormgetDataForm()Gets the underlying data form.StringgetEmail()Gets the e-mail address.StringgetFamilyName()Gets the family name.StringgetFaqEntry()Gets the FAQ entry.StringgetFormType()Gets the form type of the data form.StringgetGivenName()Gets the given name.StringgetRoomNick()Gets the desired room nick.URLgetWebPage()Gets an URL to a web page.booleanisRegisterAllowed()Indicates, whether the registration request is approved.RoomRegistration.BuildertoBuilder()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:StandardizedDataFormGets the form type of the data form.- Specified by:
getFormTypein interfaceStandardizedDataForm- Returns:
- The form type.
-
getDataForm
public final DataForm getDataForm()
Gets the underlying data form.- Specified by:
getDataFormin 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.
-
-