public final class NodeMetaData extends Object
DataForm with form type http://jabber.org/protocol/pubsub#meta-data, which can be used to retrieve node meta data.
DataForm to retrieve standard data from it, use:
NodeMetaData nodeMetaData = new NodeMetaData(dataForm);
To build a form:
NodeMetaData nodeMetaData = NodeMetaData.builder()
.contacts(Collections.singleton(Jid.of("contact")))
.creationDate(date)
.creator(Jid.of("creator"))
.description("desc")
.language("de")
.numberOfSubscribers(2)
.owners(Collections.singleton(Jid.of("owner")))
.publishers(Collections.singleton(Jid.of("publisher")))
.title("title")
.payloadType("namespace")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
NodeMetaData.Builder
A builder class to build the meta data form.
|
| Constructor and Description |
|---|
NodeMetaData(DataForm dataForm)
Creates a node meta data form.
|
| Modifier and Type | Method and Description |
|---|---|
static NodeMetaData.Builder |
builder()
Creates the builder to build a meta data form.
|
List<Jid> |
getContacts()
Gets the contacts.
|
Instant |
getCreationDate()
Gets the creation date.
|
Jid |
getCreator()
Gets the creator.
|
DataForm |
getDataForm()
Gets the underlying data form.
|
String |
getDescription()
Gets the description.
|
Locale |
getLanguage()
Gets the language.
|
String |
getNodeTitle()
Gets the title.
|
Integer |
getNumberOfSubscribers()
Gets the number of subscribers.
|
List<Jid> |
getOwners()
Gets the owners.
|
String |
getPayloadType()
Gets the payload type of the node.
|
List<Jid> |
getPublishers()
Gets the publishers.
|
public static final String FORM_TYPE
public NodeMetaData(DataForm dataForm)
dataForm - The underlying data form.public static NodeMetaData.Builder builder()
public final DataForm getDataForm()
public final Instant getCreationDate()
public final Jid getCreator()
public final String getDescription()
public final Locale getLanguage()
public final Integer getNumberOfSubscribers()
public final String getNodeTitle()
public final String getPayloadType()
Copyright © 2014–2018 XMPP.rocks. All rights reserved.