tigase.pubsub.repository
Class PubSubDAOPool

java.lang.Object
  extended by tigase.pubsub.repository.PubSubDAO
      extended by tigase.pubsub.repository.PubSubDAOPool
All Implemented Interfaces:
IPubSubDAO

public class PubSubDAOPool
extends PubSubDAO


Field Summary
 
Fields inherited from class tigase.pubsub.repository.PubSubDAO
CREATION_DATE_KEY, NODES_KEY
 
Constructor Summary
PubSubDAOPool(tigase.db.UserRepository userRepository, PubSubConfig config)
           
 
Method Summary
 void addDao(PubSubDAO dao)
           
 void addToRootCollection(String nodeName)
          Method description
 void createNode(String nodeName, String ownerJid, AbstractNodeConfig nodeConfig, NodeType nodeType, String collection)
          Method description
 void deleteItem(String nodeName, String id)
          Method description
 void deleteNode(String nodeName)
          Method description
 void destroy()
          Method description
 tigase.xml.Element getItem(String nodeName, String id)
          Method description
 Date getItemCreationDate(String nodeName, String id)
          Method description
 String[] getItemsIds(String nodeName)
          Method description
 Date getItemUpdateDate(String nodeName, String id)
          Method description
 NodeAffiliations getNodeAffiliations(String nodeName)
          Method description
 String[] getNodesList()
          Method description
 NodeSubscriptions getNodeSubscriptions(String nodeName)
          Method description
 String[] getRootNodes()
          Method description
 void init()
          Method description
protected  String readNodeConfigFormData(String nodeName)
           
 void removeAllFromRootCollection()
          Method description
 void removeFromRootCollection(String nodeName)
          Method description
 void removeSubscriptions(String nodeName, int changedIndex)
          Method description
 PubSubDAO takeDao()
           
 void updateAffiliations(String nodeName, String serializedData)
          Method description
 void updateNodeConfig(String nodeName, String serializedData)
          Method description
 void updateSubscriptions(String nodeName, int changedIndex, String serializedData)
          Method description
 void writeItem(String nodeName, long timeInMilis, String id, String publisher, tigase.xml.Element item)
          Method description
 
Methods inherited from class tigase.pubsub.repository.PubSubDAO
getBuddyGroups, getBuddySubscription, getItemPublisher, getNodeConfig, getNodeConfig, getNodeCreationDate, getUserRoster, itemDataToElement, update, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PubSubDAOPool

public PubSubDAOPool(tigase.db.UserRepository userRepository,
                     PubSubConfig config)
Method Detail

addDao

public void addDao(PubSubDAO dao)

addToRootCollection

public void addToRootCollection(String nodeName)
                         throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
addToRootCollection in interface IPubSubDAO
Overrides:
addToRootCollection in class PubSubDAO
Throws:
RepositoryException

createNode

public void createNode(String nodeName,
                       String ownerJid,
                       AbstractNodeConfig nodeConfig,
                       NodeType nodeType,
                       String collection)
                throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
createNode in interface IPubSubDAO
Overrides:
createNode in class PubSubDAO
Throws:
RepositoryException

deleteItem

public void deleteItem(String nodeName,
                       String id)
                throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
deleteItem in interface IPubSubDAO
Overrides:
deleteItem in class PubSubDAO
Throws:
RepositoryException

deleteNode

public void deleteNode(String nodeName)
                throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
deleteNode in interface IPubSubDAO
Overrides:
deleteNode in class PubSubDAO
Throws:
RepositoryException

destroy

public void destroy()
Description copied from class: PubSubDAO
Method description

Specified by:
destroy in interface IPubSubDAO
Overrides:
destroy in class PubSubDAO

getItem

public tigase.xml.Element getItem(String nodeName,
                                  String id)
                           throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
getItem in interface IPubSubDAO
Overrides:
getItem in class PubSubDAO
Throws:
RepositoryException

getItemCreationDate

public Date getItemCreationDate(String nodeName,
                                String id)
                         throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
getItemCreationDate in interface IPubSubDAO
Overrides:
getItemCreationDate in class PubSubDAO
Returns:
Throws:
RepositoryException

getItemsIds

public String[] getItemsIds(String nodeName)
                     throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
getItemsIds in interface IPubSubDAO
Overrides:
getItemsIds in class PubSubDAO
Throws:
RepositoryException

getItemUpdateDate

public Date getItemUpdateDate(String nodeName,
                              String id)
                       throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
getItemUpdateDate in interface IPubSubDAO
Overrides:
getItemUpdateDate in class PubSubDAO
Returns:
Throws:
RepositoryException

getNodeAffiliations

public NodeAffiliations getNodeAffiliations(String nodeName)
                                     throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
getNodeAffiliations in interface IPubSubDAO
Overrides:
getNodeAffiliations in class PubSubDAO
Returns:
Throws:
RepositoryException

getNodesList

public String[] getNodesList()
                      throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
getNodesList in interface IPubSubDAO
Overrides:
getNodesList in class PubSubDAO
Returns:
Throws:
RepositoryException

getNodeSubscriptions

public NodeSubscriptions getNodeSubscriptions(String nodeName)
                                       throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
getNodeSubscriptions in interface IPubSubDAO
Overrides:
getNodeSubscriptions in class PubSubDAO
Throws:
RepositoryException

getRootNodes

public String[] getRootNodes()
                      throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
getRootNodes in interface IPubSubDAO
Overrides:
getRootNodes in class PubSubDAO
Returns:
Throws:
RepositoryException

init

public void init()
          throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
init in interface IPubSubDAO
Overrides:
init in class PubSubDAO
Throws:
RepositoryException

readNodeConfigFormData

protected String readNodeConfigFormData(String nodeName)
                                 throws tigase.db.TigaseDBException
Overrides:
readNodeConfigFormData in class PubSubDAO
Throws:
tigase.db.TigaseDBException

removeAllFromRootCollection

public void removeAllFromRootCollection()
                                 throws RepositoryException
Description copied from class: PubSubDAO
Method description

Overrides:
removeAllFromRootCollection in class PubSubDAO
Throws:
RepositoryException

removeFromRootCollection

public void removeFromRootCollection(String nodeName)
                              throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
removeFromRootCollection in interface IPubSubDAO
Overrides:
removeFromRootCollection in class PubSubDAO
Throws:
RepositoryException

removeSubscriptions

public void removeSubscriptions(String nodeName,
                                int changedIndex)
                         throws RepositoryException
Description copied from class: PubSubDAO
Method description

Overrides:
removeSubscriptions in class PubSubDAO
Throws:
RepositoryException

takeDao

public PubSubDAO takeDao()

updateAffiliations

public void updateAffiliations(String nodeName,
                               String serializedData)
                        throws RepositoryException
Description copied from class: PubSubDAO
Method description

Overrides:
updateAffiliations in class PubSubDAO
Throws:
RepositoryException

updateNodeConfig

public void updateNodeConfig(String nodeName,
                             String serializedData)
                      throws RepositoryException
Description copied from class: PubSubDAO
Method description

Overrides:
updateNodeConfig in class PubSubDAO
Throws:
RepositoryException

updateSubscriptions

public void updateSubscriptions(String nodeName,
                                int changedIndex,
                                String serializedData)
                         throws RepositoryException
Description copied from class: PubSubDAO
Method description

Overrides:
updateSubscriptions in class PubSubDAO
Throws:
RepositoryException

writeItem

public void writeItem(String nodeName,
                      long timeInMilis,
                      String id,
                      String publisher,
                      tigase.xml.Element item)
               throws RepositoryException
Description copied from class: PubSubDAO
Method description

Specified by:
writeItem in interface IPubSubDAO
Overrides:
writeItem in class PubSubDAO
Throws:
RepositoryException


Copyright © 2008-2012 Tigase. All Rights Reserved.