Package rocks.xmpp.extensions.data.model
Class DataForm.Builder<T extends DataForm.Builder<T>>
- java.lang.Object
-
- rocks.xmpp.extensions.data.model.DataForm.Builder<T>
-
- Type Parameters:
T- The sub builder.
- Direct Known Subclasses:
NodeConfiguration.Builder,NodeMetaData.Builder,PublishOptions.Builder,RequestVoice.Builder,RoomConfiguration.Builder,RoomInfo.Builder,RoomRegistration.Builder,SubscribeOptions.Builder
- Enclosing class:
- DataForm
public abstract static class DataForm.Builder<T extends DataForm.Builder<T>> extends Object
An abstract builder to build simple data forms.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tfields(Collection<DataForm.Field> fields)Sets the fields.TformType(String formType)Sets the form type.Tinstructions(Collection<String> instructions)Sets the instructions of the form.Titems(Collection<DataForm.Item> items)Sets the items of the form.Tpages(Collection<Page> pages)Sets the pages of the form.TreportedFields(Collection<DataForm.Field> reportedFields)Sets the reported fields of the form.Ttitle(String title)Sets the title of the form.Ttype(DataForm.Type type)Sets the type of the form.
-
-
-
Method Detail
-
fields
public final T fields(Collection<DataForm.Field> fields)
Sets the fields. Fields are appended to the existing fields.- Parameters:
fields- The fields.- Returns:
- The builder.
-
formType
public final T formType(String formType)
Sets the form type.- Parameters:
formType- The form type.- Returns:
- The builder.
-
type
public final T type(DataForm.Type type)
Sets the type of the form.- Parameters:
type- The data form type.- Returns:
- The builder.
-
title
public final T title(String title)
Sets the title of the form.- Parameters:
title- The title.- Returns:
- The builder.
-
instructions
public final T instructions(Collection<String> instructions)
Sets the instructions of the form.- Parameters:
instructions- The instructions.- Returns:
- The builder.
-
pages
public final T pages(Collection<Page> pages)
Sets the pages of the form.- Parameters:
pages- The pages.- Returns:
- The builder.
-
items
public final T items(Collection<DataForm.Item> items)
Sets the items of the form.- Parameters:
items- The items.- Returns:
- The builder.
-
reportedFields
public final T reportedFields(Collection<DataForm.Field> reportedFields)
Sets the reported fields of the form.- Parameters:
reportedFields- The reported fields.- Returns:
- The builder.
-
-