Wildfire 3.2.4 Javadoc

org.jivesoftware.wildfire.pubsub
Class PublishedItem

java.lang.Object
  extended by org.jivesoftware.wildfire.pubsub.PublishedItem

public class PublishedItem
extends Object

A published item to a node. Once an item was published to a node, node subscribers will be notified of the new published item. The item publisher may be allowed to delete published items. After a published item was deleted node subscribers will get an event notification.

Published items may be persisted to the database depending on the node configuration. Actually, even when the node is configured to not persist items the last published item is going to be persisted to the database. The reason for this is that the node may need to send the last published item to new subscribers.

Author:
Matt Tucker

Method Summary
 boolean canDelete(JID user)
          Returns true if the user that is trying to delete an item is allowed to delete it.
 Date getCreationDate()
          Returns the datetime when the items was published.
 String getID()
          Returns the ID that uniquely identifies the published item in the node.
 LeafNode getNode()
          Returns the LeafNode where this item was published.
 org.dom4j.Element getPayload()
          Returns the payload included when publishing the item.
 String getPayloadXML()
          Returns a textual representation of the payload or null if no payload was specified with the item.
 JID getPublisher()
          Returns the JID of the entity that published the item to the node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNode

public LeafNode getNode()
Returns the LeafNode where this item was published.

Returns:
the leaf node where this item was published.

getID

public String getID()
Returns the ID that uniquely identifies the published item in the node.

Returns:
the ID that uniquely identifies the published item in the node.

getPublisher

public JID getPublisher()
Returns the JID of the entity that published the item to the node.

Returns:
the JID of the entity that published the item to the node.

getCreationDate

public Date getCreationDate()
Returns the datetime when the items was published.

Returns:
the datetime when the items was published.

getPayload

public org.dom4j.Element getPayload()
Returns the payload included when publishing the item. A published item may or may not have a payload. Transient nodes that are configured to not broadcast payloads may allow published items to have no payload.

Returns:
the payload included when publishing the item or null if none was found.

getPayloadXML

public String getPayloadXML()
Returns a textual representation of the payload or null if no payload was specified with the item.

Returns:
a textual representation of the payload or null if no payload was specified with the item.

canDelete

public boolean canDelete(JID user)
Returns true if the user that is trying to delete an item is allowed to delete it. Only the publisher or node admins (i.e. owners and sysadmins) are allowed to delete items.

Parameters:
user - the full JID of the user trying to delete the item.
Returns:
true if the user that is trying to delete an item is allowed to delete it.

Wildfire 3.2.4 Javadoc

Copyright © 2003-2007 Jive Software.