|
||||||||||
| 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(java.lang.String user,
java.lang.String subnode,
java.lang.String key,
java.lang.String[] list)
Describe addDataList method here. |
void |
addUser(java.lang.String user)
Describe addUser method here. |
java.lang.String |
getData(java.lang.String user,
java.lang.String key)
Describe getData method here. |
java.lang.String |
getData(java.lang.String user,
java.lang.String subnode,
java.lang.String key)
Describe getData method here. |
java.lang.String |
getData(java.lang.String user,
java.lang.String subnode,
java.lang.String key,
java.lang.String def)
Describe getData method here. |
java.lang.String[] |
getDataList(java.lang.String user,
java.lang.String subnode,
java.lang.String key)
Describe getDataList method here. |
java.lang.String[] |
getKeys(java.lang.String user)
Describe getKeys method here. |
java.lang.String[] |
getKeys(java.lang.String user,
java.lang.String subnode)
Describe getKeys method here. |
java.lang.String |
getResourceUri()
Describe getResourceUri method here. |
java.lang.String[] |
getSubnodes(java.lang.String user)
Describe getSubnodes method here. |
java.lang.String[] |
getSubnodes(java.lang.String user,
java.lang.String subnode)
Describe getSubnodes method here. |
java.util.List<java.lang.String> |
getUsers()
Describe getUsers method here. |
long |
getUsersCount()
Describe getUsersCount method here. |
long |
getUsersCount(java.lang.String domain)
This method is only used by the server statistics component to report number of registered users for given domain. |
void |
initRepository(java.lang.String string,
java.util.Map<java.lang.String,java.lang.String> params)
Describe initRepository method here. |
void |
removeData(java.lang.String user,
java.lang.String key)
Describe removeData method here. |
void |
removeData(java.lang.String user,
java.lang.String subnode,
java.lang.String key)
Describe removeData method here. |
void |
removeSubnode(java.lang.String user,
java.lang.String subnode)
Describe removeSubnode method here. |
void |
removeUser(java.lang.String user)
Describe removeUser method here. |
void |
setData(java.lang.String user,
java.lang.String key,
java.lang.String value)
Describe setData method here. |
void |
setData(java.lang.String user,
java.lang.String subnode,
java.lang.String key,
java.lang.String value)
Describe setData method here. |
void |
setDataList(java.lang.String user,
java.lang.String subnode,
java.lang.String key,
java.lang.String[] list)
Describe setDataList method here. |
boolean |
userExists(java.lang.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 java.lang.String getData(java.lang.String user,
java.lang.String subnode,
java.lang.String key,
java.lang.String def)
getData method here.
getData in interface UserRepositoryuser - 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 java.lang.String getData(java.lang.String user,
java.lang.String subnode,
java.lang.String key)
getData method here.
getData in interface UserRepositoryuser - 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 java.lang.String getData(java.lang.String user,
java.lang.String key)
getData method here.
getData in interface UserRepositoryuser - 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(java.lang.String string,
java.util.Map<java.lang.String,java.lang.String> params)
initRepository method here.
initRepository in interface UserRepositorystring - a String value
DBInitException - if an error occurspublic java.lang.String getResourceUri()
getResourceUri method here.
getResourceUri in interface UserRepositoryString valuepublic java.util.List<java.lang.String> getUsers()
getUsers method here.
getUsers in interface UserRepositoryList value
TigaseDBException - if an error occurspublic long getUsersCount()
getUsersCount method here.
getUsersCount in interface UserRepositorylong valuepublic void addUser(java.lang.String user)
addUser method here.
addUser in interface UserRepositoryuser - a String value of user id consisting of user name
and domain address.public boolean userExists(java.lang.String user)
UserRepositoryuserExists 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 UserRepositoryuser - a String value
boolean valuepublic void removeUser(java.lang.String user)
removeUser method here.
removeUser in interface UserRepositoryuser - a String value
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
public java.lang.String[] getDataList(java.lang.String user,
java.lang.String subnode,
java.lang.String key)
getDataList method here.
getDataList in interface UserRepositoryuser - 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[] value
public java.lang.String[] getSubnodes(java.lang.String user,
java.lang.String subnode)
getSubnodes method here.
getSubnodes in interface UserRepositoryuser - 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 java.lang.String[] getSubnodes(java.lang.String user)
getSubnodes method here.
getSubnodes in interface UserRepositoryuser - a String value of user ID for which data must be
stored. User ID consists of user name and domain name.
String[] value
public java.lang.String[] getKeys(java.lang.String user,
java.lang.String subnode)
getKeys method here.
getKeys in interface UserRepositoryuser - 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 java.lang.String[] getKeys(java.lang.String user)
getKeys method here.
getKeys in interface UserRepositoryuser - a String value of user ID for which data must be
stored. User ID consists of user name and domain name.
String[] value
public void removeData(java.lang.String user,
java.lang.String subnode,
java.lang.String key)
removeData method here.
removeData in interface UserRepositoryuser - 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(java.lang.String user,
java.lang.String key)
removeData method here.
removeData in interface UserRepositoryuser - 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(java.lang.String user,
java.lang.String subnode)
removeSubnode method here.
removeSubnode in interface UserRepositoryuser - 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(java.lang.String user,
java.lang.String subnode,
java.lang.String key,
java.lang.String value)
setData method here.
setData in interface UserRepositoryuser - 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(java.lang.String user,
java.lang.String key,
java.lang.String value)
setData method here.
setData in interface UserRepositoryuser - 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(java.lang.String user,
java.lang.String subnode,
java.lang.String key,
java.lang.String[] list)
setDataList method here.
setDataList in interface UserRepositoryuser - 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(java.lang.String user,
java.lang.String subnode,
java.lang.String key,
java.lang.String[] list)
addDataList method here.
addDataList in interface UserRepositoryuser - 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(java.lang.String domain)
UserRepository
getUsersCount in interface UserRepositorylong number of registered users in the repository.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||