|
Openfire 3.5.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.openfire.pubsub.PubSubPersistenceManager
public class PubSubPersistenceManager
A manager responsible for ensuring node persistence.
Constructor Summary | |
---|---|
PubSubPersistenceManager()
|
Method Summary | |
---|---|
static void |
createDefaultConfiguration(PubSubService service,
DefaultNodeConfiguration config)
Creates a new default node configuration for the specified service. |
static void |
createNode(PubSubService service,
Node node)
Creates and stores the node configuration in the database. |
static boolean |
createPublishedItem(PubSubService service,
PublishedItem item)
Creates and stores the published item in the database. |
static DefaultNodeConfiguration |
loadDefaultConfiguration(PubSubService service,
boolean isLeafType)
Loads from the database the default node configuration for the specified node type and pubsub service. |
static void |
loadItems(PubSubService service,
LeafNode node)
Loads and adds the published items to the specified node. |
static void |
loadNodes(PubSubService service)
Loads all nodes from the database and adds them to the PubSub service. |
static void |
removeAffiliation(PubSubService service,
Node node,
NodeAffiliate affiliate)
Removes the affiliation and subsription state of the user from the DB. |
static boolean |
removeNode(PubSubService service,
Node node)
Removes the specified node from the DB. |
static boolean |
removePublishedItem(PubSubService service,
PublishedItem item)
Removes the specified published item from the DB. |
static void |
removeSubscription(PubSubService service,
Node node,
NodeSubscription subscription)
Removes the subscription of the user from the DB. |
static void |
saveAffiliation(PubSubService service,
Node node,
NodeAffiliate affiliate,
boolean create)
Update the DB with the new affiliation of the user in the node. |
static void |
saveSubscription(PubSubService service,
Node node,
NodeSubscription subscription,
boolean create)
Updates the DB with the new subsription of the user to the node. |
static void |
updateDefaultConfiguration(PubSubService service,
DefaultNodeConfiguration config)
Updates the default node configuration for the specified service. |
static void |
updateNode(PubSubService service,
Node node)
Updates the node configuration in the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PubSubPersistenceManager()
Method Detail |
---|
public static void createNode(PubSubService service, Node node)
service
- The pubsub service that is hosting the node.node
- The newly created node.public static void updateNode(PubSubService service, Node node)
service
- The pubsub service that is hosting the node.node
- The updated node.public static boolean removeNode(PubSubService service, Node node)
service
- The pubsub service that is hosting the node.node
- The node that is being deleted.
public static void loadNodes(PubSubService service)
service
- the pubsub service that is hosting the nodes.public static void saveAffiliation(PubSubService service, Node node, NodeAffiliate affiliate, boolean create)
service
- The pubsub service that is hosting the node.node
- The node where the affiliation of the user was updated.affiliate
- The new affiliation of the user in the node.create
- True if this is a new affiliate.public static void removeAffiliation(PubSubService service, Node node, NodeAffiliate affiliate)
service
- The pubsub service that is hosting the node.node
- The node where the affiliation of the user was updated.affiliate
- The existing affiliation and subsription state of the user in the node.public static void saveSubscription(PubSubService service, Node node, NodeSubscription subscription, boolean create)
service
- The pubsub service that is hosting the node.node
- The node where the user has subscribed to.subscription
- The new subscription of the user to the node.create
- True if this is a new affiliate.public static void removeSubscription(PubSubService service, Node node, NodeSubscription subscription)
service
- The pubsub service that is hosting the node.node
- The node where the user was subscribed to.subscription
- The existing subsription of the user to the node.public static void loadItems(PubSubService service, LeafNode node)
service
- the pubsub service that is hosting the node.node
- the leaf node to load its published items.public static boolean createPublishedItem(PubSubService service, PublishedItem item)
service
- the pubsub service that is hosting the node.item
- The published item to save.
public static boolean removePublishedItem(PubSubService service, PublishedItem item)
service
- the pubsub service that is hosting the node.item
- The published item to delete.
public static DefaultNodeConfiguration loadDefaultConfiguration(PubSubService service, boolean isLeafType)
service
- the default node configuration used by this pubsub service.isLeafType
- true if loading default configuration for leaf nodes.
public static void createDefaultConfiguration(PubSubService service, DefaultNodeConfiguration config)
service
- the default node configuration used by this pubsub service.config
- the default node configuration to create in the database.public static void updateDefaultConfiguration(PubSubService service, DefaultNodeConfiguration config)
service
- the default node configuration used by this pubsub service.config
- the default node configuration to update in the database.
|
Openfire 3.5.0 Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |