public final class NodeConfiguration extends Object
DataForm with form type http://jabber.org/protocol/pubsub#node_config, which can be used to configure a pubsub node.
DataForm to retrieve standard data from it, use:
NodeConfiguration nodeConfiguration = new NodeConfiguration(dataForm);
To build a form:
NodeConfiguration nodeConfiguration = NodeConfiguration.builder()
.accessModel(AccessModel.AUTHORIZE)
.bodyXslt(new URL("http://xmpp.org"))
.childrenAssociationPolicy(ChildrenAssociationPolicy.OWNERS)
.childrenAssociationWhitelist(Collections.singleton(Jid.of("domain")))
.children(Collections.singleton("collection1"))
.childrenMax(23)
.collection(Collections.singleton("collections"))
.contacts(Collections.singleton(Jid.of("contact")))
.dataformXslt(new URL("http://www.xmpp.org"))
.deliverNotifications(true)
.deliverPayloads(false)
.description("description")
.itemExpire(2)
.itemReply(ItemReply.OWNER)
.language("de")
.maxItems(4)
.maxPayloadSize(54)
.nodeType(NodeType.LEAF)
.notificationType(AbstractMessage.Type.NORMAL)
.notifyConfig(true)
.notifyDelete(true)
.notifyRetract(true)
.notifySub(true)
.persistItems(true)
.presenceBasedDelivery(true)
.publisherModel(PublisherModel.OPEN)
.purgeOffline(false)
.rosterGroupsAllowed(Arrays.asList("group1", "group2"))
.sendLastPublishedItem(SendLastPublishedItem.ON_SUB_AND_PRESENCE)
.temporarySubscriptions(true)
.allowSubscriptions(true)
.title("Title")
.type("Type")
.build();
| Modifier and Type | Class and Description |
|---|---|
static class |
NodeConfiguration.Builder
A builder to build node configurations.
|
| Constructor and Description |
|---|
NodeConfiguration(DataForm dataForm) |
| Modifier and Type | Method and Description |
|---|---|
static NodeConfiguration.Builder |
builder()
Gets the builder to build a node configuration.
|
AccessModel |
getAccessModel()
Who may subscribe and retrieve items.
|
URL |
getBodyXslt()
The URL of an XSL transformation which can be
applied to payloads in order to generate an
appropriate message body element.
|
List<String> |
getChildren()
The child nodes (leaf or collection) associated with a collection.
|
ChildrenAssociationPolicy |
getChildrenAssociationPolicy()
Who may associate leaf nodes with a collection.
|
List<Jid> |
getChildrenAssociationWhitelist()
The list of JIDs that may associate leaf nodes with a collection.
|
Integer |
getChildrenMax()
The maximum number of child nodes that can be associated with a collection.
|
List<String> |
getCollection()
The collection(s) with which a node is affiliated.
|
List<Jid> |
getContacts()
The JIDs of those to contact with questions.
|
DataForm |
getDataForm()
Gets the underlying data form.
|
URL |
getDataformXslt()
The URL of an XSL transformation which can be
applied to the payload format in order to generate
a valid Data Forms result that the client could
display using a generic Data Forms rendering
engine.
|
String |
getDescription()
A description of the node.
|
Integer |
getItemExpire()
Number of seconds after which to automatically purge items.
|
ItemReply |
getItemReply()
Whether owners or publisher should receive replies to items.
|
String |
getLanguage()
The default language of the node.
|
Integer |
getMaxItems()
The maximum number of items to persist.
|
Integer |
getMaxPayloadSize()
The maximum payload size in bytes
|
String |
getNodeTitle()
A friendly name for the node.
|
NodeType |
getNodeType()
Whether the node is a leaf (default) or a collection.
|
Message.Type |
getNotificationType()
Specifies the delivery style for notifications.
|
String |
getPayloadType()
The type of node data, usually specified by
the namespace of the payload (if any).
|
PublisherModel |
getPublisherModel()
The publisher model.
|
List<String> |
getRosterGroupsAllowed()
Gets the allowed roster groups.
|
SendLastPublishedItem |
getSendLastPublishedItem()
Gets the value which specifies when to send the last published item.
|
Boolean |
isAllowSubscriptions()
Whether to allow subscriptions.
|
Boolean |
isDeliverNotifications()
Whether to deliver event notifications.
|
Boolean |
isDeliverPayloads()
Whether to deliver payloads with event notifications; applies only to leaf nodes.
|
Boolean |
isNotifyConfig()
Whether to notify subscribers when the node configuration changes.
|
Boolean |
isNotifyDelete()
Whether to notify subscribers when the node is deleted.
|
Boolean |
isNotifyRetract()
Whether to notify subscribers when items are removed from the node.
|
Boolean |
isNotifySub()
Whether to notify owners about new subscribers and unsubscribes.
|
Boolean |
isPersistItems()
Whether to persist items to storage.
|
Boolean |
isPresenceBasedDelivery()
Whether to deliver notifications to available users only.
|
Boolean |
isPurgeOffline()
Whether to purge all items when the relevant publisher goes offline.
|
Boolean |
isTemporarySubscriptions()
Whether to make all subscriptions temporary, based on subscriber presence.
|
public NodeConfiguration(DataForm dataForm)
public static NodeConfiguration.Builder builder()
public final DataForm getDataForm()
public final AccessModel getAccessModel()
public final URL getBodyXslt()
public final ChildrenAssociationPolicy getChildrenAssociationPolicy()
public final List<Jid> getChildrenAssociationWhitelist()
public final List<String> getChildren()
public final Integer getChildrenMax()
public final List<String> getCollection()
public final List<Jid> getContacts()
public final URL getDataformXslt()
public final Boolean isDeliverNotifications()
public final Boolean isDeliverPayloads()
public final String getDescription()
public final Integer getItemExpire()
public final ItemReply getItemReply()
public final String getLanguage()
public final Integer getMaxItems()
public final Integer getMaxPayloadSize()
public final NodeType getNodeType()
public final Message.Type getNotificationType()
public final Boolean isNotifyConfig()
public final Boolean isNotifyDelete()
public final Boolean isNotifyRetract()
public final Boolean isNotifySub()
public final Boolean isPersistItems()
public final Boolean isPresenceBasedDelivery()
public final PublisherModel getPublisherModel()
public final Boolean isPurgeOffline()
public final List<String> getRosterGroupsAllowed()
public final SendLastPublishedItem getSendLastPublishedItem()
public final Boolean isTemporarySubscriptions()
public final Boolean isAllowSubscriptions()
public final String getNodeTitle()
public final String getPayloadType()
Copyright © 2014–2016 XMPP.rocks. All rights reserved.