|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttigase.db.DummyRepository
public class DummyRepository
DummyRepository is a class with all methods empty. They don't return anything and they don't throw exception. SessionManager requires a user repository to work properly but in some installations there is no need for user repository as authentication is done through external data source and user roster is pulled dynamically. Created: Sat Nov 3 16:17:03 2007
Constructor Summary | |
---|---|
DummyRepository()
|
Method Summary | |
---|---|
void |
addDataList(String user,
String subnode,
String key,
String[] list)
Describe addDataList method here. |
void |
addUser(String user)
Describe addUser method here. |
String |
getData(String user,
String key)
Describe getData method here. |
String |
getData(String user,
String subnode,
String key)
Describe getData method here. |
String |
getData(String user,
String subnode,
String key,
String def)
Describe getData method here. |
String[] |
getDataList(String user,
String subnode,
String key)
Describe getDataList method here. |
String[] |
getKeys(String user)
Describe getKeys method here. |
String[] |
getKeys(String user,
String subnode)
Describe getKeys method here. |
String |
getResourceUri()
Describe getResourceUri method here. |
String[] |
getSubnodes(String user)
Describe getSubnodes method here. |
String[] |
getSubnodes(String user,
String subnode)
Describe getSubnodes method here. |
List<String> |
getUsers()
Describe getUsers method here. |
long |
getUsersCount()
Describe getUsersCount method here. |
long |
getUsersCount(String domain)
This method is only used by the server statistics component to report number of registered users for given domain. |
void |
initRepository(String string,
Map<String,String> params)
Describe initRepository method here. |
void |
removeData(String user,
String key)
Describe removeData method here. |
void |
removeData(String user,
String subnode,
String key)
Describe removeData method here. |
void |
removeSubnode(String user,
String subnode)
Describe removeSubnode method here. |
void |
removeUser(String user)
Describe removeUser method here. |
void |
setData(String user,
String key,
String value)
Describe setData method here. |
void |
setData(String user,
String subnode,
String key,
String value)
Describe setData method here. |
void |
setDataList(String user,
String subnode,
String key,
String[] list)
Describe setDataList method here. |
boolean |
userExists(String user)
Method userExists checks whether the user (or repository top node)
exists in the database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DummyRepository()
Method Detail |
---|
public String getData(String user, String subnode, String key, String def)
getData
method here.
getData
in interface UserRepository
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.
String
value of null always.public String getData(String user, String subnode, String key)
getData
method here.
getData
in interface UserRepository
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.
String
value of null always.public String getData(String user, String key)
getData
method here.
getData
in interface UserRepository
user
- a String
value of user ID for which data must be
stored. User ID consists of user name and domain name.key
- a String
with which the needed value is
associated.
String
value of null always.public void initRepository(String string, Map<String,String> params)
initRepository
method here.
initRepository
in interface UserRepository
string
- a String
value
DBInitException
- if an error occurspublic String getResourceUri()
getResourceUri
method here.
getResourceUri
in interface UserRepository
String
valuepublic List<String> getUsers()
getUsers
method here.
getUsers
in interface UserRepository
List
value
TigaseDBException
- if an error occurspublic long getUsersCount()
getUsersCount
method here.
getUsersCount
in interface UserRepository
long
valuepublic void addUser(String user)
addUser
method here.
addUser
in interface UserRepository
user
- a String
value of user id consisting of user name
and domain address.public boolean userExists(String user)
UserRepository
userExists
checks whether the user (or repository top node)
exists in the database. The method doesn't throw any exception nor it creates
the user in case it is missing. It just checks whether the user is already
in the database.
Please don't overuse this method. All other methods
throw UserNotFoundException
exception in case the user is missing
for which you executed the method. The exception is thrown unless
userAutoCreate
property is set to true. In such case the exception
is never thrown and the methods are executed for given parameters prior to
creating user entry if it is missing.
Therefore this method should be used only to check whether the account exists
without creating it.
userExists
in interface UserRepository
user
- a String
value
boolean
valuepublic void removeUser(String user)
removeUser
method here.
removeUser
in interface UserRepository
user
- a String
value
UserNotFoundException
- if an error occurs
TigaseDBException
- if an error occurspublic String[] getDataList(String user, String subnode, String key)
getDataList
method here.
getDataList
in interface UserRepository
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.
String[]
valuepublic String[] getSubnodes(String user, String subnode)
getSubnodes
method here.
getSubnodes
in interface UserRepository
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.
String[]
valuepublic String[] getSubnodes(String user)
getSubnodes
method here.
getSubnodes
in interface UserRepository
user
- a String
value of user ID for which data must be
stored. User ID consists of user name and domain name.
String[]
valuepublic String[] getKeys(String user, String subnode)
getKeys
method here.
getKeys
in interface UserRepository
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.
String[]
value
UserNotFoundException
- if an error occurs
TigaseDBException
- if an error occurspublic String[] getKeys(String user)
getKeys
method here.
getKeys
in interface UserRepository
user
- a String
value of user ID for which data must be
stored. User ID consists of user name and domain name.
String[]
valuepublic void removeData(String user, String subnode, String key)
removeData
method here.
removeData
in interface UserRepository
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
for which the value is to be removed.public void removeData(String user, String key)
removeData
method here.
removeData
in interface UserRepository
user
- a String
value of user ID for which data must be
stored. User ID consists of user name and domain name.key
- a String
for which the value is to be removed.public void removeSubnode(String user, String subnode)
removeSubnode
method here.
removeSubnode
in interface UserRepository
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 to subnode which
has to be removed. Node path has the same form as directory path on file
system: /root/subnode1/subnode2.
public void setData(String user, String subnode, String key, String value)
setData
method here.
setData
in interface UserRepository
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 value is to be
associated.value
- a String
value to be associated with the
specified key.public void setData(String user, String key, String value)
setData
method here.
setData
in interface UserRepository
user
- a String
value of user ID for which data must be
stored. User ID consists of user name and domain name.key
- a String
with which the specified value is to be
associated.value
- a String
value to be associated with the
specified key.public void setDataList(String user, String subnode, String key, String[] list)
setDataList
method here.
setDataList
in interface UserRepository
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.public void addDataList(String user, String subnode, String key, String[] list)
addDataList
method here.
addDataList
in interface UserRepository
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.public long getUsersCount(String domain)
UserRepository
getUsersCount
in interface UserRepository
long
number of registered users in the repository.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |