public class PublishedItem extends Object implements Serializable
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.
Modifier and Type | Method and Description |
---|---|
boolean |
canDelete(org.xmpp.packet.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.
|
String |
getItemKey()
Returns a string that uniquely identifies this published item
in the following format: nodeId:itemId
|
static String |
getItemKey(LeafNode node,
String itemId)
Returns a string that uniquely identifies this published item
in the following format: nodeId:itemId
|
LeafNode |
getNode()
Returns the
LeafNode where this item was published. |
String |
getNodeID()
Returns the id for 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. |
org.xmpp.packet.JID |
getPublisher()
Returns the JID of the entity that published the item to the node.
|
public String getNodeID()
LeafNode
where this item was published.public LeafNode getNode()
LeafNode
where this item was published.public String getID()
public org.xmpp.packet.JID getPublisher()
public Date getCreationDate()
public org.dom4j.Element getPayload()
null
if none was found.public String getPayloadXML()
null
if no payload
was specified with the item.public boolean canDelete(org.xmpp.packet.JID user)
user
- the full JID of the user trying to delete the item.public String getItemKey()
public static String getItemKey(LeafNode node, String itemId)
node
- Node for the published itemitemId
- Id for the published item (unique within the node)Copyright © 2003–2020 Ignite Realtime. All rights reserved.