tigase.db
Interface NonAuthUserRepository


public interface NonAuthUserRepository

Describe interface WriteOnlyUserRepository here. Created: Sat Oct 14 20:42:30 2006

Version:
$Rev: 630 $
Author:
Artur Hefczyc

Field Summary
static java.lang.String OFFLINE_DATA_NODE
           
static java.lang.String PUBLIC_DATA_NODE
           
 
Method Summary
 void addOfflineData(java.lang.String user, java.lang.String subnode, java.lang.String key, java.lang.String value)
          addDataList method adds mode entries to existing data list associated with given key in repository under given node path.
 void addOfflineDataList(java.lang.String user, java.lang.String subnode, java.lang.String key, java.lang.String[] list)
          addDataList method adds mode entries to existing data list associated with given key in repository under given node path.
 java.lang.String getPublicData(java.lang.String user, java.lang.String subnode, java.lang.String key, java.lang.String def)
          getPublicData method returns a value associated with given key for user repository in given subnode.
 java.lang.String[] getPublicDataList(java.lang.String user, java.lang.String subnode, java.lang.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.
 

Field Detail

PUBLIC_DATA_NODE

static final java.lang.String PUBLIC_DATA_NODE
See Also:
Constant Field Values

OFFLINE_DATA_NODE

static final java.lang.String OFFLINE_DATA_NODE
See Also:
Constant Field Values
Method Detail

getPublicData

java.lang.String getPublicData(java.lang.String user,
                               java.lang.String subnode,
                               java.lang.String key,
                               java.lang.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 - 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.
Returns:
a String value
Throws:
UserNotFoundException - if user id hasn't been found in reository.

getPublicDataList

java.lang.String[] getPublicDataList(java.lang.String user,
                                     java.lang.String subnode,
                                     java.lang.String key)
                                     throws UserNotFoundException
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.

Parameters:
user - 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.
Returns:
a String[] value
Throws:
UserNotFoundException - if user id hasn't been found in reository.

addOfflineDataList

void addOfflineDataList(java.lang.String user,
                        java.lang.String subnode,
                        java.lang.String key,
                        java.lang.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 to setDataList(...) except it doesn't remove existing data.

Parameters:
user - 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.
Throws:
UserNotFoundException - if user id hasn't been found in reository.

addOfflineData

void addOfflineData(java.lang.String user,
                    java.lang.String subnode,
                    java.lang.String key,
                    java.lang.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 to setDataList(...) except it doesn't remove existing data.

Parameters:
user - 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.
Throws:
UserNotFoundException - if user id hasn't been found in reository.
DataOverwriteException


Copyright © 2009 Tigase. All Rights Reserved.