Class NodeConfiguration.Builder

    • Method Detail

      • accessModel

        public final NodeConfiguration.Builder accessModel​(AccessModel accessModel)
        Who may subscribe and retrieve items.
        Parameters:
        accessModel - Who may subscribe and retrieve items.
        Returns:
        The builder.
      • allowSubscriptions

        public final NodeConfiguration.Builder allowSubscriptions​(Boolean allowSubscriptions)
        Whether to allow subscriptions.
        Parameters:
        allowSubscriptions - Whether to allow subscriptions.
        Returns:
        The builder.
      • bodyXslt

        public final NodeConfiguration.Builder bodyXslt​(URL bodyXslt)
        The URL of an XSL transformation which can be applied to payloads in order to generate an appropriate message body element.
        Parameters:
        bodyXslt - The URL.
        Returns:
        The builder.
      • childrenAssociationPolicy

        public final NodeConfiguration.Builder childrenAssociationPolicy​(ChildrenAssociationPolicy childrenAssociationPolicy)
        Who may associate leaf nodes with a collection.
        Parameters:
        childrenAssociationPolicy - Who may associate leaf nodes with a collection.
        Returns:
        The builder.
      • childrenAssociationWhitelist

        public final NodeConfiguration.Builder childrenAssociationWhitelist​(Collection<Jid> childrenAssociationWhitelist)
        The list of JIDs that may associate leaf nodes with a collection.
        Parameters:
        childrenAssociationWhitelist - The list of JIDs that may associate leaf nodes with a collection.
        Returns:
        The builder.
      • children

        public final NodeConfiguration.Builder children​(Collection<String> children)
        The child nodes (leaf or collection) associated with a collection.
        Parameters:
        children - The child nodes (leaf or collection) associated with a collection.
        Returns:
        The builder.
      • childrenMax

        public final NodeConfiguration.Builder childrenMax​(Integer childrenMax)
        The maximum number of child nodes that can be associated with a collection.
        Parameters:
        childrenMax - The maximum number of child nodes that can be associated with a collection.
        Returns:
        The builder.
      • collection

        public final NodeConfiguration.Builder collection​(Collection<String> collection)
        The collection(s) with which a node is affiliated.
        Parameters:
        collection - The collection(s) with which a node is affiliated.
        Returns:
        The builder.
      • contacts

        public final NodeConfiguration.Builder contacts​(Collection<Jid> contacts)
        The JIDs of those to contact with questions
        Parameters:
        contacts - The JIDs of those to contact with questions.
        Returns:
        The builder.
      • dataformXslt

        public final NodeConfiguration.Builder dataformXslt​(URL dataformXslt)
        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
        Parameters:
        dataformXslt - The URL.
        Returns:
        The builder.
      • deliverNotifications

        public final NodeConfiguration.Builder deliverNotifications​(Boolean deliverNotifications)
        Whether to deliver event notifications.
        Parameters:
        deliverNotifications - Whether to deliver event notifications.
        Returns:
        The builder.
      • deliverPayloads

        public final NodeConfiguration.Builder deliverPayloads​(Boolean deliverPayloads)
        Whether to deliver payloads with event notifications; applies only to leaf nodes.
        Parameters:
        deliverPayloads - Whether to deliver payloads with event notifications; applies only to leaf nodes.
        Returns:
        The builder.
      • description

        public final NodeConfiguration.Builder description​(String description)
        A description of the node.
        Parameters:
        description - A description of the node.
        Returns:
        The builder.
      • itemExpire

        public final NodeConfiguration.Builder itemExpire​(Integer itemExpire)
        Number of seconds after which to automatically purge items.
        Parameters:
        itemExpire - Number of seconds after which to automatically purge items.
        Returns:
        The builder.
      • itemReply

        public final NodeConfiguration.Builder itemReply​(ItemReply itemReply)
        Whether owners or publisher should receive replies to items.
        Parameters:
        itemReply - Whether owners or publisher should receive replies to items.
        Returns:
        The builder.
      • language

        public final NodeConfiguration.Builder language​(Locale language)
        The default language of the node.
        Parameters:
        language - The default language of the node.
        Returns:
        The builder.
      • language

        public final NodeConfiguration.Builder language​(String language)
        The default language of the node.
        Parameters:
        language - The default language of the node.
        Returns:
        The builder.
      • maxItems

        public final NodeConfiguration.Builder maxItems​(Integer maxItems)
        The maximum number of items to persist.
        Parameters:
        maxItems - The maximum number of items to persist.
        Returns:
        The builder.
      • maxPayloadSize

        public final NodeConfiguration.Builder maxPayloadSize​(Integer maxPayloadSize)
        The maximum payload size in bytes.
        Parameters:
        maxPayloadSize - The maximum payload size in bytes.
        Returns:
        The builder.
      • nodeType

        public final NodeConfiguration.Builder nodeType​(NodeType nodeType)
        Whether the node is a leaf (default) or a collection.
        Parameters:
        nodeType - Whether the node is a leaf (default) or a collection.
        Returns:
        The builder.
      • notificationType

        public final NodeConfiguration.Builder notificationType​(Message.Type notificationType)
        Specify the delivery style for notifications.
        Parameters:
        notificationType - The notification type.
        Returns:
        The builder.
      • notifyConfig

        public final NodeConfiguration.Builder notifyConfig​(Boolean notifyConfig)
        Whether to notify subscribers when the node configuration changes.
        Parameters:
        notifyConfig - Whether to notify subscribers when the node configuration changes.
        Returns:
        The builder.
      • notifyDelete

        public final NodeConfiguration.Builder notifyDelete​(Boolean notifyDelete)
        Whether to notify subscribers when the node is deleted.
        Parameters:
        notifyDelete - Whether to notify subscribers when the node is deleted.
        Returns:
        The builder.
      • notifyRetract

        public final NodeConfiguration.Builder notifyRetract​(Boolean notifyRetract)
        Whether to notify subscribers when items are removed from the node.
        Parameters:
        notifyRetract - Whether to notify subscribers when items are removed from the node.
        Returns:
        The builder.
      • notifySub

        public final NodeConfiguration.Builder notifySub​(Boolean notifySub)
        Whether to notify owners about new subscribers and unsubscribes.
        Parameters:
        notifySub - Whether to notify owners about new subscribers and unsubscribes.
        Returns:
        The builder.
      • persistItems

        public final NodeConfiguration.Builder persistItems​(Boolean persistItems)
        Whether to persist items to storage.
        Parameters:
        persistItems - Whether to persist items to storage.
        Returns:
        The builder.
      • presenceBasedDelivery

        public final NodeConfiguration.Builder presenceBasedDelivery​(Boolean presenceBasedDelivery)
        Whether to deliver notifications to available users only.
        Parameters:
        presenceBasedDelivery - Whether to deliver notifications to available users only.
        Returns:
        The builder.
      • publisherModel

        public final NodeConfiguration.Builder publisherModel​(PublisherModel publisherModel)
        The publisher model.
        Parameters:
        publisherModel - The publisher model.
        Returns:
        The builder.
      • purgeOffline

        public final NodeConfiguration.Builder purgeOffline​(Boolean purgeOffline)
        Whether to purge all items when the relevant publisher goes offline.
        Parameters:
        purgeOffline - Whether to purge all items when the relevant publisher goes offline.
        Returns:
        The builder.
      • rosterGroupsAllowed

        public final NodeConfiguration.Builder rosterGroupsAllowed​(Collection<String> rosterGroupsAllowed)
        The roster group(s) allowed to subscribe and retrieve items.
        Parameters:
        rosterGroupsAllowed - The roster group(s) allowed to subscribe and retrieve items.
        Returns:
        The builder.
      • sendLastPublishedItem

        public final NodeConfiguration.Builder sendLastPublishedItem​(SendLastPublishedItem sendLastPublishedItem)
        When to send the last published item.
        Parameters:
        sendLastPublishedItem - When to send the last published item.
        Returns:
        The builder.
      • temporarySubscriptions

        public final NodeConfiguration.Builder temporarySubscriptions​(Boolean temporarySubscriptions)
        Whether to make all subscriptions temporary, based on subscriber presence.
        Parameters:
        temporarySubscriptions - Whether to make all subscriptions temporary, based on subscriber presence.
        Returns:
        The builder.
        See Also:
        12.4 Temporary Subscriptions
      • nodeTitle

        public final NodeConfiguration.Builder nodeTitle​(String title)
        A friendly name for the node.
        Parameters:
        title - The title.
        Returns:
        The name.
      • type

        public final NodeConfiguration.Builder type​(String type)
        The type of node data, usually specified by the namespace of the payload (if any).
        Parameters:
        type - The type.
        Returns:
        The builder.