public class CollectionNode extends Node
Modifier and Type | Class and Description |
---|---|
static class |
CollectionNode.LeafNodeAssociationPolicy
Policy that defines who may associate leaf nodes with a collection.
|
Node.ItemReplyPolicy
accessModel, affiliates, bodyXSLT, contacts, creationDate, creator, dataformXSLT, deliverPayloads, description, language, name, nodeID, notifyConfigChanges, notifyDelete, notifyRetract, parent, payloadType, presenceBasedDelivery, publisherModel, replyPolicy, replyRooms, replyTo, rosterGroupsAllowed, service, subscriptionConfigurationRequired, subscriptionEnabled, subscriptionsByID, subscriptionsByJID
Constructor and Description |
---|
CollectionNode(PubSubService service,
CollectionNode parentNode,
String nodeID,
org.xmpp.packet.JID creator) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFormFields(org.xmpp.forms.DataForm form,
boolean isEditing)
Adds the required form fields to the specified form.
|
protected void |
configure(org.xmpp.forms.FormField field)
Configures the node with the completed form field.
|
protected void |
deletingNode()
Notification message indicating that the node is being deleted.
|
CollectionNode.LeafNodeAssociationPolicy |
getAssociationPolicy()
Returns the policy that defines who may associate leaf nodes with a collection.
|
Collection<org.xmpp.packet.JID> |
getAssociationTrusted()
Returns the users that are allowed to associate leaf nodes with this collection node.
|
int |
getMaxLeafNodes()
Returns the max number of leaf nodes that this collection node might have.
|
Collection<Node> |
getNodes()
Returns the list of nodes contained by this node.
|
boolean |
isAssociationAllowed(org.xmpp.packet.JID user)
Returns true if the specified user is allowed to associate a leaf node with this
node.
|
boolean |
isChildNode(Node child)
Returns true if the specified node is a first-level children of this collection
node.
|
boolean |
isCollectionNode()
Returns true if this node is a node container.
|
boolean |
isDescendantNode(Node child)
Returns true if the specified node is a direct child node of this collection node or
a descendant of the children nodes.
|
boolean |
isMaxLeafNodeReached()
Returns true if the max number of leaf nodes associated with this node has
reached to the maximum allowed.
|
addAffiliate, addNoneAffiliation, addOutcast, addOwner, addPublisher, addSubscription, approveSubscription, broadcastNodeEvent, cancelSubscription, cancelSubscription, changeParent, configure, createSubscription, delete, equals, getAccessModel, getAffiliate, getAllAffiliates, getAllSubscriptions, getBodyXSLT, getConfigurationForm, getContacts, getCreationDate, getCreator, getDataformXSLT, getDescription, getLanguage, getLastPublishedItem, getMetadataForm, getModificationDate, getName, getNodeID, getOwners, getParent, getParents, getPayloadType, getPendingSubscriptions, getPublishedItem, getPublishedItems, getPublishedItems, getPublisherModel, getPublishers, getReplyPolicy, getReplyRooms, getReplyTo, getRosterGroupsAllowed, getService, getSubscription, getSubscription, getSubscriptions, hashCode, isAdmin, isMultipleSubscriptionsEnabled, isNotifiedOfConfigChanges, isNotifiedOfDelete, isNotifiedOfRetract, isPayloadDelivered, isPresenceBasedDelivery, isPresenceBasedDelivery, isRootCollectionNode, isSendItemSubscribe, isSubscriptionConfigurationRequired, isSubscriptionEnabled, removeOutcast, removeOwner, removePublisher, saveToDB, sendEventNotification, toString
public CollectionNode(PubSubService service, CollectionNode parentNode, String nodeID, org.xmpp.packet.JID creator)
protected void configure(org.xmpp.forms.FormField field) throws NotAcceptableException
Node
Node.configure(org.xmpp.forms.DataForm)
.
Subclasses should implement this method in order to configure the node with form
fields specific to the node type.configure
in class Node
field
- the form field specific to the node type.NotAcceptableException
- if field cannot be configured because of invalid data.protected void addFormFields(org.xmpp.forms.DataForm form, boolean isEditing)
Node
addFormFields
in class Node
form
- the form containing the node configuration.isEditing
- true when the form will be used to edit the node configuration.protected void deletingNode()
Node
deletingNode
in class Node
public boolean isCollectionNode()
Node
isCollectionNode
in class Node
public boolean isChildNode(Node child)
isChildNode
in class Node
child
- the node to check if it is a direct child of this node.public boolean isDescendantNode(Node child)
isDescendantNode
in class Node
child
- the node to check if it is a descendant of this node.public Collection<Node> getNodes()
Node
CollectionNode
may
contain other nodes.public CollectionNode.LeafNodeAssociationPolicy getAssociationPolicy()
public Collection<org.xmpp.packet.JID> getAssociationTrusted()
whitelist
.public int getMaxLeafNodes()
public boolean isAssociationAllowed(org.xmpp.packet.JID user)
user
- the user trying to associate a leaf node with this node.public boolean isMaxLeafNodeReached()
Copyright © 2003–2019 Ignite Realtime. All rights reserved.