public class NonAuthUserRepositoryImpl extends Object implements NonAuthUserRepository
OFFLINE_DATA_NODE, PUBLIC_DATA_NODE| Constructor and Description |
|---|
NonAuthUserRepositoryImpl(UserRepository userRep,
tigase.xmpp.BareJID defDomain,
boolean autoCreateOffline)
Constructs ...
|
| Modifier and Type | Method and Description |
|---|---|
void |
addOfflineData(tigase.xmpp.BareJID user,
String subnode,
String key,
String value)
addDataList method adds mode entries to existing data list
associated with given key in repository under given node path. |
void |
addOfflineDataList(tigase.xmpp.BareJID user,
String subnode,
String key,
String[] list)
addDataList method adds mode entries to existing data list
associated with given key in repository under given node path. |
String |
getDomainTempData(tigase.xmpp.BareJID domain,
String subnode,
String key,
String def)
Retrieves and returns a value associated with given subnode and key from a publicly
available space.
|
String |
getPublicData(tigase.xmpp.BareJID user,
String subnode,
String key,
String def)
getPublicData method returns a value associated with given key for
user repository in given subnode. |
String[] |
getPublicDataList(tigase.xmpp.BareJID user,
String subnode,
String key)
getPublicDataList method returns array of values associated with
given key or null if given key does not exist for given user
ID in given node path. |
String |
getTempData(String subnode,
String key,
String def)
Retrieves and returns a value associated with given subnode and key from a publicly
available space.
|
void |
putDomainTempData(tigase.xmpp.BareJID domain,
String subnode,
String key,
String value)
The method allows to store some temporary data by the plugin in publicly available
space.
|
void |
putTempData(String subnode,
String key,
String value)
The method allows to store some temporary data by the plugin in publicly available
space.
|
void |
removeDomainTempData(tigase.xmpp.BareJID domain,
String subnode,
String key)
The method allows to remove existing data stored in a temporary storage space associated
with a given DNS domain.
|
void |
removeTempData(String subnode,
String key)
The method allows to remove existing data stored in the Tigase instance specific
temporary storage.
|
public NonAuthUserRepositoryImpl(UserRepository userRep, tigase.xmpp.BareJID defDomain, boolean autoCreateOffline)
userRep - defDomain - autoCreateOffline - public void addOfflineData(tigase.xmpp.BareJID user,
String subnode,
String key,
String value)
throws UserNotFoundException,
DataOverwriteException
NonAuthUserRepositoryaddDataList method adds mode entries to existing data list
associated with given key in repository under given node path.
This method is very similar to setDataList(...) except it
doesn't remove existing data.addOfflineData in interface NonAuthUserRepositoryuser - a String value of user ID for which data must be
stored. User ID consists of user name and domain name.subnode - a String value is a node path where data is
stored. Node path has the same form as directory path on file system:
/root/subnode1/subnode2.
key - a String with which the specified values list is to
be associated.value - a String is an array of values to be assosiated
with the specified key.UserNotFoundException - if user id hasn't been found in reository.DataOverwriteExceptionpublic void addOfflineDataList(tigase.xmpp.BareJID user,
String subnode,
String key,
String[] list)
throws UserNotFoundException
NonAuthUserRepositoryaddDataList method adds mode entries to existing data list
associated with given key in repository under given node path.
This method is very similar to setDataList(...) except it
doesn't remove existing data.addOfflineDataList in interface NonAuthUserRepositoryuser - a String value of user ID for which data must be
stored. User ID consists of user name and domain name.subnode - a String value is a node path where data is
stored. Node path has the same form as directory path on file system:
/root/subnode1/subnode2.
key - a String with which the specified values list is to
be associated.list - a String[] is an array of values to be assosiated
with the specified key.UserNotFoundException - if user id hasn't been found in reository.public String getDomainTempData(tigase.xmpp.BareJID domain, String subnode, String key, String def) throws TigaseDBException
NonAuthUserRepositorygetDomainTempData in interface NonAuthUserRepositorydomain - is a DNS domain name with which the data is associated.subnode - a String value is a node path where data is
stored. Node path has the same form as directory path on file system:
/root/subnode1/subnode2.
key - a String with which the needed value is
associated.def - a String value which is returned in case if data
for specified key does not exixist in repository.String value for a given subnode and key or def]
if no entry has been found.TigaseDBException - if there was an error during reading data from the repository.public String getPublicData(tigase.xmpp.BareJID user, String subnode, String key, String def) throws UserNotFoundException
NonAuthUserRepositorygetPublicData method returns a value associated with given key for
user repository in given subnode.
If key is not found in repository given default value is returned.getPublicData in interface NonAuthUserRepositoryuser - a String value of user ID for which data must be
stored. User ID consists of user name and domain name.subnode - a String value is a node path where data is
stored. Node path has the same form as directory path on file system:
/root/subnode1/subnode2.
key - a String with which the needed value is
associated.def - a String value which is returned in case if data
for specified key does not exixist in repository.String value for a given subnode and key or def
if no entry has been found.UserNotFoundException - if user id hasn't been found in reository.public String[] getPublicDataList(tigase.xmpp.BareJID user, String subnode, String key) throws UserNotFoundException
NonAuthUserRepositorygetPublicDataList method returns array of values associated with
given key or null if given key does not exist for given user
ID in given node path.getPublicDataList in interface NonAuthUserRepositoryuser - a String value of user ID for which data must be
stored. User ID consists of user name and domain name.subnode - a String value is a node path where data is
stored. Node path has the same form as directory path on file system:
/root/subnode1/subnode2.
key - a String with which the needed values list is
associated.String[] valueUserNotFoundException - if user id hasn't been found in reository.public String getTempData(String subnode, String key, String def) throws TigaseDBException
NonAuthUserRepositorygetTempData in interface NonAuthUserRepositorysubnode - a String value is a node path where data is
stored. Node path has the same form as directory path on file system:
/root/subnode1/subnode2.
key - a String with which the needed value is
associated.def - a String value which is returned in case if data
for specified key does not exixist in repository.String value for a given subnode and key or def
if no entry has been found.TigaseDBException - if there was an error during reading data from the repository.public void putDomainTempData(tigase.xmpp.BareJID domain,
String subnode,
String key,
String value)
throws TigaseDBException
NonAuthUserRepositoryputDomainTempData in interface NonAuthUserRepositorydomain - is a DNS domain name with which the data is associated.subnode - a String value is a node path where data is
stored. Node path has the same form as directory path on file system:
/root/subnode1/subnode2.
key - a String with which the specified values list is to
be associated.value - a String is an array of values to be assosiated
with the specified key.TigaseDBException - if there was an error during writing data to the repository.public void putTempData(String subnode, String key, String value) throws TigaseDBException
NonAuthUserRepositoryputTempData in interface NonAuthUserRepositorysubnode - a String value is a node path where data is
stored. Node path has the same form as directory path on file system:
/root/subnode1/subnode2.
key - a String with which the specified values list is to
be associated.value - a String is an array of values to be assosiated
with the specified key.TigaseDBException - if there was an error during writing data to the repository.public void removeDomainTempData(tigase.xmpp.BareJID domain,
String subnode,
String key)
throws TigaseDBException
NonAuthUserRepositoryremoveDomainTempData in interface NonAuthUserRepositorydomain - is a DNS domain name with which the data is associated.subnode - a String value is a node path where data is
stored. Node path has the same form as directory path on file system:
/root/subnode1/subnode2.
key - a String with which the specified values list is to
be associated.TigaseDBException - if there was an error during writing data to the repository.public void removeTempData(String subnode, String key) throws TigaseDBException
NonAuthUserRepositoryremoveTempData in interface NonAuthUserRepositorysubnode - a String value is a node path where data is
stored. Node path has the same form as directory path on file system:
/root/subnode1/subnode2.
key - a String with which the specified values list is to
be associated.TigaseDBException - if there was an error during writing data to the repository.Copyright © 2016 "Tigase, Inc.". All rights reserved.