Package tigase.db
Interface NonAuthUserRepository
- All Known Implementing Classes:
NonAuthUserRepositoryImpl
public interface NonAuthUserRepository
Describe interface WriteOnlyUserRepository here.
Created: Sat Oct 14 20:42:30 2006
Created: Sat Oct 14 20:42:30 2006
- Author:
- Artur Hefczyc
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOfflineData
(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
(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.getDomainTempData
(BareJID domain, String subnode, String key, String def) Retrieves and returns a value associated with given subnode and key from a publicly available space.getPublicData
(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
(BareJID user, String subnode, String key) getPublicDataList
method returns array of values associated with given key ornull
if given key does not exist for given user ID in given node path.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
(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
(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.
-
Field Details
-
PUBLIC_DATA_NODE
- See Also:
-
OFFLINE_DATA_NODE
- See Also:
-
-
Method Details
-
addOfflineData
void addOfflineData(BareJID user, String subnode, String key, String value) throws UserNotFoundException, DataOverwriteException addDataList
method adds mode entries to existing data list associated with given key in repository under given node path. This method is very similar tosetDataList(...)
except it doesn't remove existing data.- Parameters:
user
- aString
value of user ID for which data must be stored. User ID consists of user name and domain name.subnode
- aString
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
- aString
with which the specified values list is to be associated.value
- aString
is an array of values to be assosiated with the specified key.- Throws:
UserNotFoundException
- if user id hasn't been found in reository.DataOverwriteException
-
addOfflineDataList
void addOfflineDataList(BareJID user, String subnode, String key, String[] list) throws UserNotFoundException addDataList
method adds mode entries to existing data list associated with given key in repository under given node path. This method is very similar tosetDataList(...)
except it doesn't remove existing data.- Parameters:
user
- aString
value of user ID for which data must be stored. User ID consists of user name and domain name.subnode
- aString
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
- aString
with which the specified values list is to be associated.list
- aString[]
is an array of values to be assosiated with the specified key.- Throws:
UserNotFoundException
- if user id hasn't been found in reository.
-
getDomainTempData
String getDomainTempData(BareJID domain, String subnode, String key, String def) throws TigaseDBException Retrieves and returns a value associated with given subnode and key from a publicly available space. The space is specific to given virtual domain and is shared among all running cluster nodes. The data are stored in some temporary space outside of the registered user data so no information for registered users can be retrieved.- Parameters:
domain
- is a DNS domain name with which the data is associated.subnode
- aString
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
- aString
with which the needed value is associated.def
- aString
value which is returned in case if data for specified key does not exixist in repository.- Returns:
- a
String
value for a given subnode and key ordef]
if no entry has been found. - Throws:
TigaseDBException
- if there was an error during reading data from the repository.
-
getPublicData
String getPublicData(BareJID user, String subnode, String key, String def) throws UserNotFoundException getPublicData
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.- Parameters:
user
- aString
value of user ID for which data must be stored. User ID consists of user name and domain name.subnode
- aString
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
- aString
with which the needed value is associated.def
- aString
value which is returned in case if data for specified key does not exixist in repository.- Returns:
- a
String
value for a given subnode and key ordef
if no entry has been found. - Throws:
UserNotFoundException
- if user id hasn't been found in reository.
-
getPublicDataList
getPublicDataList
method returns array of values associated with given key ornull
if given key does not exist for given user ID in given node path.- Parameters:
user
- aString
value of user ID for which data must be stored. User ID consists of user name and domain name.subnode
- aString
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
- aString
with which the needed values list is associated.- Returns:
- a
String[]
value - Throws:
UserNotFoundException
- if user id hasn't been found in reository.
-
getTempData
Retrieves and returns a value associated with given subnode and key from a publicly available space. The space is specific for the Tigase instance and is not shared among different cluster nodes. The data is stored in some temporary space outside of the registered user data. So no information for registered users can be retrieved.- Parameters:
subnode
- aString
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
- aString
with which the needed value is associated.def
- aString
value which is returned in case if data for specified key does not exixist in repository.- Returns:
- a
String
value for a given subnode and key ordef
if no entry has been found. - Throws:
TigaseDBException
- if there was an error during reading data from the repository.
-
putDomainTempData
void putDomainTempData(BareJID domain, String subnode, String key, String value) throws TigaseDBException The method allows to store some temporary data by the plugin in publicly available space. The space is specific to given virtual domain and is shared among all running cluster nodes. The data is stored in some place outside of the normal user space so no information for registered user can be overwriten.
If there is already a value for a given subnode and key it will be overwritten otherwise a new entry will be created.- Parameters:
domain
- is a DNS domain name with which the data is associated.subnode
- aString
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
- aString
with which the specified values list is to be associated.value
- aString
is an array of values to be assosiated with the specified key.- Throws:
TigaseDBException
- if there was an error during writing data to the repository.
-
putTempData
The method allows to store some temporary data by the plugin in publicly available space. The space is specific for the Tigase instance and is not shared among different cluster nodes. The data is stored in some place outside of the normal user space so no information for registered user can be overwriten.
If there is already a value for a given subnode and key it will be overwritten otherwise a new entry will be created.- Parameters:
subnode
- aString
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
- aString
with which the specified values list is to be associated.value
- aString
is an array of values to be assosiated with the specified key.- Throws:
TigaseDBException
- if there was an error during writing data to the repository.
-
removeDomainTempData
The method allows to remove existing data stored in a temporary storage space associated with a given DNS domain.- Parameters:
domain
- is a DNS domain name with which the data is associated.subnode
- aString
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
- aString
with which the specified values list is to be associated.- Throws:
TigaseDBException
- if there was an error during writing data to the repository.
-
removeTempData
The method allows to remove existing data stored in the Tigase instance specific temporary storage.- Parameters:
subnode
- aString
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
- aString
with which the specified values list is to be associated.- Throws:
TigaseDBException
- if there was an error during writing data to the repository.
-