public final class PubSubOwner
extends java.lang.Object
The implementation of the <pubsub/>
element in the http://jabber.org/protocol/pubsub#owner
namespace.
Modifier and Type | Method and Description |
---|---|
java.util.List<Affiliation> |
getAffiliations()
Gets the affiliations, if this pubsub element contains ‘affiliations’ element.
|
DataForm |
getConfigurationForm()
Gets the configuration form if the pubsub element contains either a
<configure/> or a <default/> element. |
java.lang.String |
getNode()
Gets the node of the child element.
|
java.net.URI |
getRedirectUri()
Gets the redirect URI, if this pubsub element contains a ‘delete’ element.
|
java.util.List<Subscription> |
getSubscriptions()
Gets the subscriptions, if this pubsub element contains ‘subscriptions’ element.
|
boolean |
isAffiliations()
Indicates, whether this pubsub element contains a ‘subscriptions’ child element.
|
boolean |
isConfigure()
Indicates, whether this pubsub element contains a ‘configure’ child element.
|
boolean |
isDefault()
Indicates, whether this pubsub element contains a ‘default’ child element.
|
boolean |
isDelete()
Indicates, whether this pubsub element contains a ‘delete’ child element.
|
boolean |
isPurge()
Indicates, whether this pubsub element contains a ‘purge’ child element.
|
boolean |
isSubscriptions()
Indicates, whether this pubsub element contains a ‘subscriptions’ child element.
|
static PubSubOwner |
withAffiliations(java.lang.String node,
Affiliation... affiliationNodes)
Creates a pubsub element with a
<affiliations/> child element with <affiliation/> elements. |
static PubSubOwner |
withConfigure(java.lang.String node)
Creates a pubsub element with an
<configure/> child element and a ‘node’ attribute. |
static PubSubOwner |
withConfigure(java.lang.String node,
DataForm dataForm)
Creates a pubsub element with an
<configure/> child element and a ‘node’ attribute and a configuration form. |
static PubSubOwner |
withDefault()
Creates a pubsub element with a
<default/> child element. |
static PubSubOwner |
withDelete(java.lang.String node)
Creates a pubsub element with a
<delete/> child element and a ‘node’ attribute. |
static PubSubOwner |
withDelete(java.lang.String node,
java.net.URI replacementNode)
Creates a pubsub element with a
<delete/> child element, a ‘node’ attribute and a replacement node. |
static PubSubOwner |
withPurge(java.lang.String node)
Creates a pubsub element with a
<purge/> child element and a ‘node’ attribute. |
static PubSubOwner |
withSubscriptions(java.lang.String node,
Subscription... subscriptions)
Creates a pubsub element with a
<subscriptions/> child element with <subscription/> elements. |
public static PubSubOwner withConfigure(java.lang.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>
node
- The node.public static PubSubOwner withConfigure(java.lang.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>
dataForm
- The configuration form.node
- The node.public static PubSubOwner withDefault()
Creates a pubsub element with a <default/>
child element.
Sample:
<pubsub xmlns='http://jabber.org/protocol/pubsub#owner'>
<default/>
</pubsub>
public static PubSubOwner withDelete(java.lang.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>
node
- The node.public static PubSubOwner withDelete(java.lang.String node, java.net.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>
node
- The node.replacementNode
- The replacement node.public static PubSubOwner withPurge(java.lang.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>
node
- The node.public static PubSubOwner withSubscriptions(java.lang.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>
node
- The node.subscriptions
- The subscriptions.public static PubSubOwner withAffiliations(java.lang.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>
node
- The node.affiliationNodes
- The affiliations.public final DataForm getConfigurationForm()
Gets the configuration form if the pubsub element contains either a <configure/>
or a <default/>
element.
isConfigure()
,
isDefault()
public final java.lang.String getNode()
Gets the node of the child element.
public final boolean isConfigure()
Indicates, whether this pubsub element contains a ‘configure’ child element.
getConfigurationForm()
public final boolean isDefault()
Indicates, whether this pubsub element contains a ‘default’ child element.
getConfigurationForm()
public final boolean isDelete()
Indicates, whether this pubsub element contains a ‘delete’ child element.
public final boolean isPurge()
Indicates, whether this pubsub element contains a ‘purge’ child element.
public final boolean isSubscriptions()
Indicates, whether this pubsub element contains a ‘subscriptions’ child element.
getSubscriptions()
public final boolean isAffiliations()
Indicates, whether this pubsub element contains a ‘subscriptions’ child element.
getAffiliations()
public final java.util.List<Subscription> getSubscriptions()
Gets the subscriptions, if this pubsub element contains ‘subscriptions’ element.
public final java.util.List<Affiliation> getAffiliations()
Gets the affiliations, if this pubsub element contains ‘affiliations’ element.
public final java.net.URI getRedirectUri()
Gets the redirect URI, if this pubsub element contains a ‘delete’ element.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.