public class PubSubDAO extends Object implements IPubSubDAO
| Modifier and Type | Field and Description |
|---|---|
static String |
CREATION_DATE_KEY
Field description
|
protected Logger |
log |
static String |
NODES_KEY
Field description
|
| Constructor and Description |
|---|
PubSubDAO(tigase.db.UserRepository repository,
PubSubConfig pubSubConfig)
Constructs ...
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
void |
createNode(tigase.xmpp.BareJID serviceJid,
String nodeName,
tigase.xmpp.BareJID ownerJid,
AbstractNodeConfig nodeConfig,
NodeType nodeType,
String collection)
Method description
|
void |
deleteItem(tigase.xmpp.BareJID serviceJid,
String nodeName,
String id)
Method description
|
void |
deleteNode(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
void |
destroy()
Method description
|
String[] |
getBuddyGroups(tigase.xmpp.BareJID owner,
tigase.xmpp.BareJID buddy)
Method description
|
String |
getBuddySubscription(tigase.xmpp.BareJID owner,
tigase.xmpp.BareJID buddy)
Method description
|
tigase.xml.Element |
getItem(tigase.xmpp.BareJID serviceJid,
String nodeName,
String id)
Method description
|
Date |
getItemCreationDate(tigase.xmpp.BareJID serviceJid,
String nodeName,
String id)
Method description
|
String |
getItemPublisher(tigase.xmpp.BareJID serviceJid,
String nodeName,
String id)
Method description
|
String[] |
getItemsIds(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
Date |
getItemUpdateDate(tigase.xmpp.BareJID serviceJid,
String nodeName,
String id)
Method description
|
NodeAffiliations |
getNodeAffiliations(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
AbstractNodeConfig |
getNodeConfig(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
<T extends AbstractNodeConfig> |
getNodeConfig(Class<T> nodeConfigClass,
String nodeName,
tigase.form.Form configForm)
Method description
|
Date |
getNodeCreationDate(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
String[] |
getNodesList(tigase.xmpp.BareJID serviceJid)
Method description
|
NodeSubscriptions |
getNodeSubscriptions(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
String[] |
getRootNodes(tigase.xmpp.BareJID serviceJid)
Method description
|
tigase.xmpp.BareJID[] |
getUserRoster(tigase.xmpp.BareJID owner)
Method description
|
void |
init()
Method description
|
protected tigase.xml.Element |
itemDataToElement(char[] data) |
protected String |
readNodeConfigFormData(tigase.xmpp.BareJID serviceJid,
String nodeName) |
void |
removeAllFromRootCollection(tigase.xmpp.BareJID serviceJid)
Method description
|
void |
removeFromRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
Method description
|
void |
removeSubscriptions(tigase.xmpp.BareJID serviceJid,
String nodeName,
int changedIndex)
Method description
|
void |
update(tigase.xmpp.BareJID serviceJid,
String nodeName,
AbstractNodeConfig nodeConfig)
Method description
|
void |
update(tigase.xmpp.BareJID serviceJid,
String nodeName,
IAffiliations affiliations)
Method description
|
void |
updateAffiliations(tigase.xmpp.BareJID serviceJid,
String nodeName,
String serializedData)
Method description
|
void |
updateNodeConfig(tigase.xmpp.BareJID serviceJid,
String nodeName,
String serializedData)
Method description
|
void |
updateSubscriptions(tigase.xmpp.BareJID serviceJid,
String nodeName,
int changedIndex,
String serializedData)
Method description
|
void |
writeItem(tigase.xmpp.BareJID serviceJid,
String nodeName,
long timeInMilis,
String id,
String publisher,
tigase.xml.Element item)
Method description
|
public static final String CREATION_DATE_KEY
public static final String NODES_KEY
protected Logger log
public PubSubDAO(tigase.db.UserRepository repository,
PubSubConfig pubSubConfig)
repository - pubSubConfig - public void addToRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
addToRootCollection in interface IPubSubDAOnodeName - RepositoryExceptionpublic void createNode(tigase.xmpp.BareJID serviceJid,
String nodeName,
tigase.xmpp.BareJID ownerJid,
AbstractNodeConfig nodeConfig,
NodeType nodeType,
String collection)
throws RepositoryException
createNode in interface IPubSubDAOnodeName - ownerJid - nodeConfig - nodeType - collection - RepositoryExceptionpublic void deleteItem(tigase.xmpp.BareJID serviceJid,
String nodeName,
String id)
throws RepositoryException
deleteItem in interface IPubSubDAOnodeName - id - RepositoryExceptionpublic void deleteNode(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
deleteNode in interface IPubSubDAOnodeName - RepositoryExceptionpublic void destroy()
destroy in interface IPubSubDAOpublic String[] getBuddyGroups(tigase.xmpp.BareJID owner, tigase.xmpp.BareJID buddy) throws RepositoryException
getBuddyGroups in interface IPubSubDAOowner - buddy - RepositoryExceptionpublic String getBuddySubscription(tigase.xmpp.BareJID owner, tigase.xmpp.BareJID buddy) throws RepositoryException
getBuddySubscription in interface IPubSubDAOowner - buddy - RepositoryExceptionpublic tigase.xml.Element getItem(tigase.xmpp.BareJID serviceJid,
String nodeName,
String id)
throws RepositoryException
getItem in interface IPubSubDAOnodeName - id - RepositoryExceptionpublic Date getItemCreationDate(tigase.xmpp.BareJID serviceJid, String nodeName, String id) throws RepositoryException
getItemCreationDate in interface IPubSubDAOnodeName - id - RepositoryExceptionpublic String getItemPublisher(tigase.xmpp.BareJID serviceJid, String nodeName, String id) throws RepositoryException
nodeName - id - RepositoryExceptionpublic String[] getItemsIds(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
getItemsIds in interface IPubSubDAOnodeName - RepositoryExceptionpublic Date getItemUpdateDate(tigase.xmpp.BareJID serviceJid, String nodeName, String id) throws RepositoryException
getItemUpdateDate in interface IPubSubDAOnodeName - id - RepositoryExceptionpublic NodeAffiliations getNodeAffiliations(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
getNodeAffiliations in interface IPubSubDAOnodeName - RepositoryExceptionpublic AbstractNodeConfig getNodeConfig(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
getNodeConfig in interface IPubSubDAOnodeName - RepositoryExceptionpublic <T extends AbstractNodeConfig> T getNodeConfig(Class<T> nodeConfigClass, String nodeName, tigase.form.Form configForm) throws RepositoryException
T - nodeConfigClass - nodeName - configForm - RepositoryExceptionpublic Date getNodeCreationDate(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
nodeName - RepositoryExceptionpublic String[] getNodesList(tigase.xmpp.BareJID serviceJid) throws RepositoryException
getNodesList in interface IPubSubDAORepositoryExceptionpublic NodeSubscriptions getNodeSubscriptions(tigase.xmpp.BareJID serviceJid, String nodeName) throws RepositoryException
getNodeSubscriptions in interface IPubSubDAOnodeName - RepositoryExceptionpublic String[] getRootNodes(tigase.xmpp.BareJID serviceJid) throws RepositoryException
getRootNodes in interface IPubSubDAORepositoryExceptionpublic tigase.xmpp.BareJID[] getUserRoster(tigase.xmpp.BareJID owner)
throws RepositoryException
getUserRoster in interface IPubSubDAOowner - RepositoryExceptionpublic void init()
throws RepositoryException
init in interface IPubSubDAORepositoryExceptionprotected tigase.xml.Element itemDataToElement(char[] data)
protected String readNodeConfigFormData(tigase.xmpp.BareJID serviceJid, String nodeName) throws tigase.db.TigaseDBException
tigase.db.TigaseDBExceptionpublic void removeAllFromRootCollection(tigase.xmpp.BareJID serviceJid)
throws RepositoryException
RepositoryExceptionpublic void removeFromRootCollection(tigase.xmpp.BareJID serviceJid,
String nodeName)
throws RepositoryException
removeFromRootCollection in interface IPubSubDAOnodeName - RepositoryExceptionpublic void removeSubscriptions(tigase.xmpp.BareJID serviceJid,
String nodeName,
int changedIndex)
throws RepositoryException
nodeName - changedIndex - RepositoryExceptionpublic void update(tigase.xmpp.BareJID serviceJid,
String nodeName,
AbstractNodeConfig nodeConfig)
throws RepositoryException
update in interface IPubSubDAOnodeName - nodeConfig - RepositoryExceptionpublic void update(tigase.xmpp.BareJID serviceJid,
String nodeName,
IAffiliations affiliations)
throws RepositoryException
update in interface IPubSubDAOnodeName - affiliations - RepositoryExceptionpublic void updateAffiliations(tigase.xmpp.BareJID serviceJid,
String nodeName,
String serializedData)
throws RepositoryException
nodeName - serializedData - RepositoryExceptionpublic void updateNodeConfig(tigase.xmpp.BareJID serviceJid,
String nodeName,
String serializedData)
throws RepositoryException
nodeName - serializedData - RepositoryExceptionpublic void updateSubscriptions(tigase.xmpp.BareJID serviceJid,
String nodeName,
int changedIndex,
String serializedData)
throws RepositoryException
nodeName - changedIndex - serializedData - RepositoryExceptionpublic void writeItem(tigase.xmpp.BareJID serviceJid,
String nodeName,
long timeInMilis,
String id,
String publisher,
tigase.xml.Element item)
throws RepositoryException
writeItem in interface IPubSubDAOnodeName - timeInMilis - id - publisher - item - RepositoryExceptionCopyright © 2008–2014 Tigase. All rights reserved.