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(Arrays.asList(Jid.valueOf("domain")))
.children(Arrays.asList("collection1"))
.childrenMax(23)
.collection(Arrays.asList("collections"))
.contacts(Arrays.asList(Jid.valueOf("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.
|
AbstractMessage.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 DataForm getDataForm()
public AccessModel getAccessModel()
public URL getBodyXslt()
public ChildrenAssociationPolicy getChildrenAssociationPolicy()
public List<Jid> getChildrenAssociationWhitelist()
public List<String> getChildren()
public Integer getChildrenMax()
public List<String> getCollection()
public List<Jid> getContacts()
public URL getDataformXslt()
public Boolean isDeliverNotifications()
public Boolean isDeliverPayloads()
public String getDescription()
public Integer getItemExpire()
public ItemReply getItemReply()
public String getLanguage()
public Integer getMaxItems()
public Integer getMaxPayloadSize()
public NodeType getNodeType()
public AbstractMessage.Type getNotificationType()
public Boolean isNotifyConfig()
public Boolean isNotifyDelete()
public Boolean isNotifyRetract()
public Boolean isNotifySub()
public Boolean isPersistItems()
public Boolean isPresenceBasedDelivery()
public PublisherModel getPublisherModel()
public Boolean isPurgeOffline()
public List<String> getRosterGroupsAllowed()
public SendLastPublishedItem getSendLastPublishedItem()
public Boolean isTemporarySubscriptions()
public Boolean isAllowSubscriptions()
public String getNodeTitle()
public String getPayloadType()
Copyright © 2014–2015 XMPP.rocks. All rights reserved.