public class PubSubDAOJDBC extends PubSubDAO
| Modifier and Type | Field and Description |
|---|---|
protected Connection |
conn
Database active connection.
|
| Constructor and Description |
|---|
PubSubDAOJDBC(tigase.db.UserRepository repository,
PubSubConfig pubSubConfig,
String connection_str) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
long |
createNode(tigase.xmpp.BareJID serviceJid,
String nodeName,
tigase.xmpp.BareJID ownerJid,
AbstractNodeConfig nodeConfig,
NodeType nodeType,
Long collectionId)
Method description
|
void |
deleteItem(tigase.xmpp.BareJID serviceJid,
long nodeId,
String id)
Method description
|
void |
deleteNode(tigase.xmpp.BareJID serviceJid,
long nodeId)
Method description
|
void |
destroy()
Method description
|
String[] |
getAllNodesList(tigase.xmpp.BareJID serviceJid) |
String[] |
getChildNodes(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
protected Date |
getDateFromItem(tigase.xmpp.BareJID serviceJid,
long nodeId,
String id,
int field) |
tigase.xml.Element |
getItem(tigase.xmpp.BareJID serviceJid,
long nodeId,
String id) |
Date |
getItemCreationDate(tigase.xmpp.BareJID serviceJid,
long nodeId,
String id)
Method description
|
String[] |
getItemsIds(tigase.xmpp.BareJID serviceJid,
long nodeId) |
String[] |
getItemsIdsSince(tigase.xmpp.BareJID serviceJid,
long nodeId,
Date since) |
List<IItems.ItemMeta> |
getItemsMeta(tigase.xmpp.BareJID serviceJid,
long nodeId,
String nodeName) |
Date |
getItemUpdateDate(tigase.xmpp.BareJID serviceJid,
long nodeId,
String id)
Method description
|
NodeAffiliations |
getNodeAffiliations(tigase.xmpp.BareJID serviceJid,
long nodeId)
Method description
|
String |
getNodeConfig(tigase.xmpp.BareJID serviceJid,
long nodeId)
Method description
|
long |
getNodeId(tigase.xmpp.BareJID serviceJid,
String nodeName) |
String[] |
getNodesList(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
NodeSubscriptions |
getNodeSubscriptions(tigase.xmpp.BareJID serviceJid,
long nodeId) |
String |
getResourceUri() |
protected String |
getStringFromItem(tigase.xmpp.BareJID serviceJid,
long nodeId,
String id,
int field) |
Map<String,UsersAffiliation> |
getUserAffiliations(tigase.xmpp.BareJID serviceJid,
tigase.xmpp.BareJID jid) |
Map<String,UsersSubscription> |
getUserSubscriptions(tigase.xmpp.BareJID serviceJid,
tigase.xmpp.BareJID jid) |
void |
init()
Method description
|
protected String |
readNodeConfigFormData(tigase.xmpp.BareJID serviceJid,
long nodeId) |
void |
removeAllFromRootCollection(tigase.xmpp.BareJID serviceJid) |
void |
removeFromRootCollection(tigase.xmpp.BareJID serviceJid,
long nodeId)
Method description
|
void |
removeNodeSubscription(tigase.xmpp.BareJID serviceJid,
long nodeId,
tigase.xmpp.BareJID jid) |
void |
updateNodeAffiliation(tigase.xmpp.BareJID serviceJid,
long nodeId,
UsersAffiliation affiliation)
Method description
|
void |
updateNodeConfig(tigase.xmpp.BareJID serviceJid,
long nodeId,
String serializedData,
Long collectionId)
Method description
|
void |
updateNodeSubscription(tigase.xmpp.BareJID serviceJid,
long nodeId,
UsersSubscription subscription) |
void |
writeItem(tigase.xmpp.BareJID serviceJid,
long nodeId,
long timeInMilis,
String id,
String publisher,
tigase.xml.Element item)
Method description
|
getBuddyGroups, getBuddySubscription, getNodeConfig, getUserRoster, itemDataToElement, parseConfig, parseConfigFormprotected Connection conn
public PubSubDAOJDBC(tigase.db.UserRepository repository,
PubSubConfig pubSubConfig,
String connection_str)
public void addToRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
IPubSubDAORepositoryExceptionpublic long createNode(tigase.xmpp.BareJID serviceJid,
String nodeName,
tigase.xmpp.BareJID ownerJid,
AbstractNodeConfig nodeConfig,
NodeType nodeType,
Long collectionId)
throws RepositoryException
IPubSubDAORepositoryExceptionpublic void deleteItem(tigase.xmpp.BareJID serviceJid,
long nodeId,
String id)
throws RepositoryException
IPubSubDAORepositoryExceptionpublic void deleteNode(tigase.xmpp.BareJID serviceJid,
long nodeId)
throws RepositoryException
IPubSubDAORepositoryExceptionpublic void destroy()
IPubSubDAOdestroy in interface IPubSubDAOdestroy in class PubSubDAOpublic String[] getAllNodesList(tigase.xmpp.BareJID serviceJid) throws RepositoryException
RepositoryExceptionprotected Date getDateFromItem(tigase.xmpp.BareJID serviceJid, long nodeId, String id, int field) throws RepositoryException
RepositoryExceptionpublic tigase.xml.Element getItem(tigase.xmpp.BareJID serviceJid,
long nodeId,
String id)
throws RepositoryException
RepositoryExceptionpublic Date getItemCreationDate(tigase.xmpp.BareJID serviceJid, long nodeId, String id) throws RepositoryException
IPubSubDAORepositoryExceptionpublic String[] getItemsIds(tigase.xmpp.BareJID serviceJid, long nodeId) throws RepositoryException
RepositoryExceptionpublic String[] getItemsIdsSince(tigase.xmpp.BareJID serviceJid, long nodeId, Date since) throws RepositoryException
RepositoryExceptionpublic List<IItems.ItemMeta> getItemsMeta(tigase.xmpp.BareJID serviceJid, long nodeId, String nodeName) throws RepositoryException
RepositoryExceptionpublic Date getItemUpdateDate(tigase.xmpp.BareJID serviceJid, long nodeId, String id) throws RepositoryException
IPubSubDAORepositoryExceptionpublic long getNodeId(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
RepositoryExceptionpublic NodeAffiliations getNodeAffiliations(tigase.xmpp.BareJID serviceJid, long nodeId) throws RepositoryException
IPubSubDAORepositoryExceptionpublic String getNodeConfig(tigase.xmpp.BareJID serviceJid, long nodeId) throws RepositoryException
IPubSubDAORepositoryExceptionpublic String[] getNodesList(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
IPubSubDAORepositoryExceptionpublic NodeSubscriptions getNodeSubscriptions(tigase.xmpp.BareJID serviceJid, long nodeId) throws RepositoryException
RepositoryExceptionpublic String getResourceUri()
public String[] getChildNodes(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
IPubSubDAORepositoryExceptionprotected String getStringFromItem(tigase.xmpp.BareJID serviceJid, long nodeId, String id, int field) throws RepositoryException
RepositoryExceptionpublic Map<String,UsersAffiliation> getUserAffiliations(tigase.xmpp.BareJID serviceJid, tigase.xmpp.BareJID jid) throws RepositoryException
RepositoryExceptionpublic Map<String,UsersSubscription> getUserSubscriptions(tigase.xmpp.BareJID serviceJid, tigase.xmpp.BareJID jid) throws RepositoryException
RepositoryExceptionpublic void init()
throws RepositoryException
IPubSubDAOinit in interface IPubSubDAOinit in class PubSubDAORepositoryExceptionprotected String readNodeConfigFormData(tigase.xmpp.BareJID serviceJid, long nodeId) throws RepositoryException
RepositoryExceptionpublic void removeAllFromRootCollection(tigase.xmpp.BareJID serviceJid)
throws RepositoryException
RepositoryExceptionpublic void removeFromRootCollection(tigase.xmpp.BareJID serviceJid,
long nodeId)
throws RepositoryException
IPubSubDAORepositoryExceptionpublic void removeNodeSubscription(tigase.xmpp.BareJID serviceJid,
long nodeId,
tigase.xmpp.BareJID jid)
throws RepositoryException
RepositoryExceptionpublic void updateNodeAffiliation(tigase.xmpp.BareJID serviceJid,
long nodeId,
UsersAffiliation affiliation)
throws RepositoryException
IPubSubDAORepositoryExceptionpublic void updateNodeConfig(tigase.xmpp.BareJID serviceJid,
long nodeId,
String serializedData,
Long collectionId)
throws RepositoryException
IPubSubDAORepositoryExceptionpublic void updateNodeSubscription(tigase.xmpp.BareJID serviceJid,
long nodeId,
UsersSubscription subscription)
throws RepositoryException
RepositoryExceptionpublic void writeItem(tigase.xmpp.BareJID serviceJid,
long nodeId,
long timeInMilis,
String id,
String publisher,
tigase.xml.Element item)
throws RepositoryException
IPubSubDAORepositoryExceptionCopyright © 2008–2014 Tigase. All rights reserved.