Class PubSubOwner

    • Method Detail

      • withConfigure

        public static PubSubOwner withConfigure​(String node)
        Creates a pubsub element with an <configure/> child element and a 'node' attribute.

        Sample:

        
         <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
             <configure node='princely_musings'/>
         </pubsub>
         
        Parameters:
        node - The node.
        Returns:
        The pubsub instance.
        See Also:
        8.2 Configure a Node
      • withConfigure

        public static PubSubOwner withConfigure​(String node,
                                                DataForm dataForm)
        Creates a pubsub element with an <configure/> child element and a 'node' attribute and a configuration form.

        Sample:

        
         <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
             <configure node='princely_musings'/>
                <x xmlns='jabber:x:data' type='submit'>
                    <field var='FORM_TYPE' type='hidden'>
                ...
         </pubsub>
         
        Parameters:
        dataForm - The configuration form.
        node - The node.
        Returns:
        The pubsub instance.
        See Also:
        8.2.4 Form Submission
      • withDefault

        public static PubSubOwner withDefault()
        Creates a pubsub element with a <default/> child element.

        Sample:

        
         <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
             <default/>
         </pubsub>
         
        Returns:
        The pubsub instance.
        See Also:
        8.3 Request Default Node Configuration Options
      • withDelete

        public static PubSubOwner withDelete​(String node)
        Creates a pubsub element with a <delete/> child element and a 'node' attribute.

        Sample:

        
         <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
             <delete node='princely_musings'/>
         </pubsub>
         
        Parameters:
        node - The node.
        Returns:
        The pubsub instance.
        See Also:
        8.4 Delete a Node
      • withDelete

        public static PubSubOwner withDelete​(String node,
                                             URI replacementNode)
        Creates a pubsub element with a <delete/> child element, a 'node' attribute and a replacement node.

        Sample:

        
         <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
             <delete node='princely_musings'>
                 <redirect uri='xmpp:hamlet@denmark.lit?;node=blog'/>
             </delete>
         </pubsub>
         
        Parameters:
        node - The node.
        replacementNode - The replacement node.
        Returns:
        The pubsub instance.
        See Also:
        8.4 Delete a Node
      • withPurge

        public static PubSubOwner withPurge​(String node)
        Creates a pubsub element with a <purge/> child element and a 'node' attribute.

        Sample:

        
         <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
             <purge node='princely_musings'/>
         </pubsub>
         
        Parameters:
        node - The node.
        Returns:
        The pubsub instance.
        See Also:
        8.5 Purge All Node Items
      • withSubscriptions

        public static PubSubOwner withSubscriptions​(String node,
                                                    Subscription... subscriptions)
        Creates a pubsub element with a <subscriptions/> child element with <subscription/> elements.

        Sample:

        
         <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
             <subscriptions node='princely_musings'>
                 <subscription jid='bard@shakespeare.lit' subscription='subscribed'/>
             </subscriptions>
         </pubsub>
         
        Parameters:
        node - The node.
        subscriptions - The subscriptions.
        Returns:
        The pubsub instance.
        See Also:
        8.8.2 Modify Subscriptions
      • withAffiliations

        public static PubSubOwner withAffiliations​(String node,
                                                   Affiliation... affiliationNodes)
        Creates a pubsub element with a <affiliations/> child element with <affiliation/> elements.

        Sample:

        
         <pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
             <affiliations node='princely_musings'>
                 <affiliation jid='bard@shakespeare.lit' affiliation='publisher'/>
             </affiliations>
         </pubsub>
         
        Parameters:
        node - The node.
        affiliationNodes - The affiliations.
        Returns:
        The pubsub instance.
        See Also:
        8.9.2 Modify Affiliation
      • getConfigurationForm

        public final DataForm getConfigurationForm()
        Gets the configuration form if the pubsub element contains either a <configure/> or a <default/> element.
        Returns:
        The configuration form or null.
        See Also:
        isConfigure(), isDefault()
      • getNode

        public final String getNode()
        Gets the node of the child element.
        Returns:
        The node.
      • isConfigure

        public final boolean isConfigure()
        Indicates, whether this pubsub element contains a 'configure' child element.
        Returns:
        True, if the pubsub element contains a 'configure' child element.
        See Also:
        getConfigurationForm()
      • isDefault

        public final boolean isDefault()
        Indicates, whether this pubsub element contains a 'default' child element.
        Returns:
        True, if the pubsub element contains a 'default' child element.
        See Also:
        getConfigurationForm()
      • isDelete

        public final boolean isDelete()
        Indicates, whether this pubsub element contains a 'delete' child element.
        Returns:
        True, if the pubsub element contains a 'delete' child element.
      • isPurge

        public final boolean isPurge()
        Indicates, whether this pubsub element contains a 'purge' child element.
        Returns:
        True, if the pubsub element contains a 'purge' child element.
      • isSubscriptions

        public final boolean isSubscriptions()
        Indicates, whether this pubsub element contains a 'subscriptions' child element.
        Returns:
        True, if the pubsub element contains a 'subscriptions' child element.
        See Also:
        getSubscriptions()
      • isAffiliations

        public final boolean isAffiliations()
        Indicates, whether this pubsub element contains a 'subscriptions' child element.
        Returns:
        True, if the pubsub element contains a 'subscriptions' child element.
        See Also:
        getAffiliations()
      • getSubscriptions

        public final List<Subscription> getSubscriptions()
        Gets the subscriptions, if this pubsub element contains 'subscriptions' element.
        Returns:
        The subscriptions, if the pubsub element contains a 'subscriptions' child element; otherwise an empty list.
      • getAffiliations

        public final List<Affiliation> getAffiliations()
        Gets the affiliations, if this pubsub element contains 'affiliations' element.
        Returns:
        The affiliations, if the pubsub element contains a 'affiliations' child element; otherwise an empty list.
      • getRedirectUri

        public final URI getRedirectUri()
        Gets the redirect URI, if this pubsub element contains a 'delete' element.
        Returns:
        The redirect URI, if this pubsub element contains a 'delete' element; otherwise null.