public final class NodeMetaData
extends java.lang.Object
Represents a standardized 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.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FORM_TYPE |
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.
|
java.util.List<Jid> |
getContacts()
Gets the contacts.
|
java.time.Instant |
getCreationDate()
Gets the creation date.
|
Jid |
getCreator()
Gets the creator.
|
DataForm |
getDataForm()
Gets the underlying data form.
|
java.lang.String |
getDescription()
Gets the description.
|
java.util.Locale |
getLanguage()
Gets the language.
|
java.lang.String |
getNodeTitle()
Gets the title.
|
java.lang.Integer |
getNumberOfSubscribers()
Gets the number of subscribers.
|
java.util.List<Jid> |
getOwners()
Gets the owners.
|
java.lang.String |
getPayloadType()
Gets the payload type of the node.
|
java.util.List<Jid> |
getPublishers()
Gets the publishers.
|
public static final java.lang.String FORM_TYPE
public NodeMetaData(DataForm dataForm)
Creates a node meta data form.
dataForm
- The underlying data form.public static NodeMetaData.Builder builder()
Creates the builder to build a meta data form.
public final DataForm getDataForm()
Gets the underlying data form.
public final java.util.List<Jid> getContacts()
Gets the contacts.
public final java.time.Instant getCreationDate()
Gets the creation date.
public final Jid getCreator()
Gets the creator.
public final java.lang.String getDescription()
Gets the description.
public final java.util.Locale getLanguage()
Gets the language.
public final java.lang.Integer getNumberOfSubscribers()
Gets the number of subscribers.
public final java.util.List<Jid> getOwners()
Gets the owners.
public final java.util.List<Jid> getPublishers()
Gets the publishers.
public final java.lang.String getNodeTitle()
Gets the title.
public final java.lang.String getPayloadType()
Gets the payload type of the node.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.