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, Node.UniqueIdentifieraccessModel, affiliates, bodyXSLT, contacts, creationDate, creator, dataformXSLT, deliverPayloads, description, language, name, nodeID, notifyConfigChanges, notifyDelete, notifyRetract, parent, payloadType, presenceBasedDelivery, publisherModel, replyPolicy, replyRooms, replyTo, rosterGroupsAllowed, serviceIdentifier, subscriptionConfigurationRequired, subscriptionEnabled, subscriptionsByID, subscriptionsByJID| Constructor and Description |
|---|
CollectionNode() |
CollectionNode(PubSubService.UniqueIdentifier serviceId,
CollectionNode parentNode,
String nodeID,
org.xmpp.packet.JID creator,
boolean subscriptionEnabled,
boolean deliverPayloads,
boolean notifyConfigChanges,
boolean notifyDelete,
boolean notifyRetract,
boolean presenceBasedDelivery,
AccessModel accessModel,
PublisherModel publisherModel,
String language,
Node.ItemReplyPolicy replyPolicy,
CollectionNode.LeafNodeAssociationPolicy associationPolicy,
int maxLeafNodes) |
CollectionNode(PubSubService.UniqueIdentifier serviceId,
CollectionNode parentNode,
String nodeID,
org.xmpp.packet.JID creator,
DefaultNodeConfiguration defaultConfiguration) |
| 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 |
getCachedSize()
Returns the approximate size of the Object in bytes.
|
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.
|
void |
readExternal(ObjectInput in) |
void |
writeExternal(ObjectOutput out) |
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, getUniqueIdentifier, hashCode, isAdmin, isMultipleSubscriptionsEnabled, isNotifiedOfConfigChanges, isNotifiedOfDelete, isNotifiedOfRetract, isPayloadDelivered, isPresenceBasedDelivery, isPresenceBasedDelivery, isRootCollectionNode, isSendItemSubscribe, isSubscriptionConfigurationRequired, isSubscriptionEnabled, removeOutcast, removeOwner, removePublisher, saveToDB, sendEventNotification, toStringpublic CollectionNode(PubSubService.UniqueIdentifier serviceId, CollectionNode parentNode, String nodeID, org.xmpp.packet.JID creator, boolean subscriptionEnabled, boolean deliverPayloads, boolean notifyConfigChanges, boolean notifyDelete, boolean notifyRetract, boolean presenceBasedDelivery, AccessModel accessModel, PublisherModel publisherModel, String language, Node.ItemReplyPolicy replyPolicy, CollectionNode.LeafNodeAssociationPolicy associationPolicy, int maxLeafNodes)
public CollectionNode(PubSubService.UniqueIdentifier serviceId, CollectionNode parentNode, String nodeID, org.xmpp.packet.JID creator, DefaultNodeConfiguration defaultConfiguration)
public CollectionNode()
protected void configure(org.xmpp.forms.FormField field)
throws NotAcceptableException
NodeNode.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 Nodefield - 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)
NodeaddFormFields in class Nodeform - the form containing the node configuration.isEditing - true when the form will be used to edit the node configuration.protected void deletingNode()
NodedeletingNode in class Nodepublic boolean isCollectionNode()
NodeisCollectionNode in class Nodepublic boolean isChildNode(Node child)
isChildNode in class Nodechild - the node to check if it is a direct child of this node.public boolean isDescendantNode(Node child)
isDescendantNode in class Nodechild - the node to check if it is a descendant of this node.public Collection<Node> getNodes()
NodeCollectionNode 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()
public int getCachedSize()
throws CannotCalculateSizeException
CacheablegetCachedSize in interface CacheablegetCachedSize in class NodeCannotCalculateSizeException - if the size cannot be calculatedpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class NodeIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class NodeIOExceptionClassNotFoundExceptionCopyright © 2003–2020 Ignite Realtime. All rights reserved.