public class DummyRepository extends Object implements UserRepository, AuthRepository
DATA_KEY, DIGEST_ID_KEY, DIGEST_KEY, MACHANISM_KEY, PASSWORD_KEY, PROTOCOL_KEY, PROTOCOL_VAL_NONSASL, PROTOCOL_VAL_SASL, REALM_KEY, RESULT_KEY, SERVER_NAME_KEY, USER_ID_KEY, USERNAME_KEY| Constructor and Description |
|---|
DummyRepository() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDataList(tigase.xmpp.BareJID user,
String subnode,
String key,
String[] list)
Describe
addDataList method here. |
void |
addUser(tigase.xmpp.BareJID user)
Describe
addUser method here. |
void |
addUser(tigase.xmpp.BareJID user,
String password)
Method description
|
boolean |
digestAuth(tigase.xmpp.BareJID user,
String digest,
String id,
String alg)
Deprecated.
|
String |
getData(tigase.xmpp.BareJID user,
String key)
Describe
getData method here. |
String |
getData(tigase.xmpp.BareJID user,
String subnode,
String key)
Describe
getData method here. |
String |
getData(tigase.xmpp.BareJID user,
String subnode,
String key,
String def)
Describe
getData method here. |
String[] |
getDataList(tigase.xmpp.BareJID user,
String subnode,
String key)
Describe
getDataList method here. |
String[] |
getKeys(tigase.xmpp.BareJID user)
Describe
getKeys method here. |
String[] |
getKeys(tigase.xmpp.BareJID user,
String subnode)
Describe
getKeys method here. |
String |
getResourceUri()
Describe
getResourceUri method here. |
String[] |
getSubnodes(tigase.xmpp.BareJID user)
Describe
getSubnodes method here. |
String[] |
getSubnodes(tigase.xmpp.BareJID user,
String subnode)
Describe
getSubnodes method here. |
List<tigase.xmpp.BareJID> |
getUsers()
Describe
getUsers method here. |
long |
getUsersCount()
Describe
getUsersCount method here. |
long |
getUsersCount(String domain)
Method description
|
long |
getUserUID(tigase.xmpp.BareJID user)
Method description
|
void |
initRepository(String string,
Map<String,String> params)
Describe
initRepository method here. |
void |
logout(tigase.xmpp.BareJID user)
Method description
|
boolean |
otherAuth(Map<String,Object> authProps)
Method description
|
boolean |
plainAuth(tigase.xmpp.BareJID user,
String password)
Deprecated.
|
void |
queryAuth(Map<String,Object> authProps)
Method description
|
void |
removeData(tigase.xmpp.BareJID user,
String key)
Describe
removeData method here. |
void |
removeData(tigase.xmpp.BareJID user,
String subnode,
String key)
Describe
removeData method here. |
void |
removeSubnode(tigase.xmpp.BareJID user,
String subnode)
Describe
removeSubnode method here. |
void |
removeUser(tigase.xmpp.BareJID user)
Describe
removeUser method here. |
void |
setData(tigase.xmpp.BareJID user,
String key,
String value)
Describe
setData method here. |
void |
setData(tigase.xmpp.BareJID user,
String subnode,
String key,
String value)
Describe
setData method here. |
void |
setDataList(tigase.xmpp.BareJID user,
String subnode,
String key,
String[] list)
Describe
setDataList method here. |
void |
updatePassword(tigase.xmpp.BareJID user,
String password)
Method description
|
boolean |
userExists(tigase.xmpp.BareJID user)
Method description
|
public void addDataList(tigase.xmpp.BareJID user,
String subnode,
String key,
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 void addUser(tigase.xmpp.BareJID user)
addUser method here.addUser in interface UserRepositoryuser - a String value of user id consisting of user name
and domain address.public void addUser(tigase.xmpp.BareJID user,
String password)
throws UserExistsException,
TigaseDBException
addUser in interface AuthRepositoryuser - password - TigaseDBExceptionUserExistsException@Deprecated public boolean digestAuth(tigase.xmpp.BareJID user, String digest, String id, String alg) throws UserNotFoundException, TigaseDBException, AuthorizationException
digestAuth in interface AuthRepositoryuser - digest - id - alg - boolean value true on successful
authentication, false on authentication failure.AuthorizationExceptionTigaseDBExceptionUserNotFoundExceptionpublic String getData(tigase.xmpp.BareJID user, String subnode, String key, 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 String getData(tigase.xmpp.BareJID user, String subnode, 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 String getData(tigase.xmpp.BareJID user, 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 String[] getDataList(tigase.xmpp.BareJID user, String subnode, 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[] valuepublic String[] getKeys(tigase.xmpp.BareJID user, 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[] valuepublic String[] getKeys(tigase.xmpp.BareJID 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[] valuepublic String getResourceUri()
getResourceUri method here.getResourceUri in interface AuthRepositorygetResourceUri in interface UserRepositoryString valuepublic String[] getSubnodes(tigase.xmpp.BareJID user, 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 String[] getSubnodes(tigase.xmpp.BareJID 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[] valuepublic long getUserUID(tigase.xmpp.BareJID user)
throws TigaseDBException
getUserUID in interface UserRepositoryuser - TigaseDBExceptionpublic List<tigase.xmpp.BareJID> getUsers()
getUsers method here.getUsers in interface UserRepositoryList valuepublic long getUsersCount()
getUsersCount method here.getUsersCount in interface AuthRepositorygetUsersCount in interface UserRepositorylong valuepublic long getUsersCount(String domain)
getUsersCount in interface AuthRepositorygetUsersCount in interface UserRepositorydomain - long number of registered users in the repository.public void initRepository(String string, Map<String,String> params)
initRepository method here.initRepository in interface AuthRepositoryinitRepository in interface UserRepositorystring - a String valueparams - public void logout(tigase.xmpp.BareJID user)
throws UserNotFoundException,
TigaseDBException
logout in interface AuthRepositoryuser - TigaseDBExceptionUserNotFoundExceptionpublic boolean otherAuth(Map<String,Object> authProps) throws UserNotFoundException, TigaseDBException, AuthorizationException
otherAuth in interface AuthRepositoryauthProps - boolean valueAuthorizationExceptionTigaseDBExceptionUserNotFoundException@Deprecated public boolean plainAuth(tigase.xmpp.BareJID user, String password) throws UserNotFoundException, TigaseDBException, AuthorizationException
plainAuth in interface AuthRepositoryuser - password - boolean value true on successful
authentication, false on authentication failure.AuthorizationExceptionTigaseDBExceptionUserNotFoundExceptionpublic void queryAuth(Map<String,Object> authProps)
queryAuth in interface AuthRepositoryauthProps - public void removeData(tigase.xmpp.BareJID user,
String subnode,
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(tigase.xmpp.BareJID user,
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(tigase.xmpp.BareJID user,
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 removeUser(tigase.xmpp.BareJID user)
removeUser method here.removeUser in interface AuthRepositoryremoveUser in interface UserRepositoryuser - a String valuepublic void setData(tigase.xmpp.BareJID user,
String subnode,
String key,
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(tigase.xmpp.BareJID user,
String key,
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(tigase.xmpp.BareJID user,
String subnode,
String key,
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 updatePassword(tigase.xmpp.BareJID user,
String password)
throws UserNotFoundException,
TigaseDBException
updatePassword in interface AuthRepositoryuser - password - TigaseDBExceptionUserNotFoundExceptionpublic boolean userExists(tigase.xmpp.BareJID user)
userExists in interface UserRepositoryuser - boolean valueCopyright © 2013 Tigase. All rights reserved.