public class DummyRepository extends Object implements UserRepository, AuthRepository
Repository.Meta
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 |
getPassword(tigase.xmpp.BareJID user) |
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 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 addUser(tigase.xmpp.BareJID user)
addUser
method here.addUser
in interface UserRepository
user
- 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 AuthRepository
user
- password
- TigaseDBException
UserExistsException
@Deprecated public boolean digestAuth(tigase.xmpp.BareJID user, String digest, String id, String alg) throws UserNotFoundException, TigaseDBException, AuthorizationException
digestAuth
in interface AuthRepository
user
- digest
- id
- alg
- boolean
value true
on successful
authentication, false
on authentication failure.AuthorizationException
TigaseDBException
UserNotFoundException
public String getData(tigase.xmpp.BareJID 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(tigase.xmpp.BareJID 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(tigase.xmpp.BareJID 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 String[] getDataList(tigase.xmpp.BareJID 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[] getKeys(tigase.xmpp.BareJID 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[]
valuepublic String[] getKeys(tigase.xmpp.BareJID 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 String getResourceUri()
getResourceUri
method here.getResourceUri
in interface AuthRepository
getResourceUri
in interface UserRepository
String
valuepublic String[] getSubnodes(tigase.xmpp.BareJID 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(tigase.xmpp.BareJID 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 long getUserUID(tigase.xmpp.BareJID user) throws TigaseDBException
getUserUID
in interface UserRepository
user
- TigaseDBException
public List<tigase.xmpp.BareJID> getUsers()
getUsers
method here.getUsers
in interface UserRepository
List
valuepublic long getUsersCount()
getUsersCount
method here.getUsersCount
in interface AuthRepository
getUsersCount
in interface UserRepository
long
valuepublic long getUsersCount(String domain)
getUsersCount
in interface AuthRepository
getUsersCount
in interface UserRepository
domain
- long
number of registered users in the repository.public void initRepository(String string, Map<String,String> params)
initRepository
method here.initRepository
in interface Repository
string
- a String
valueparams
- public void logout(tigase.xmpp.BareJID user) throws UserNotFoundException, TigaseDBException
logout
in interface AuthRepository
user
- TigaseDBException
UserNotFoundException
public boolean otherAuth(Map<String,Object> authProps) throws UserNotFoundException, TigaseDBException, AuthorizationException
otherAuth
in interface AuthRepository
authProps
- boolean
valueAuthorizationException
TigaseDBException
UserNotFoundException
@Deprecated public boolean plainAuth(tigase.xmpp.BareJID user, String password) throws UserNotFoundException, TigaseDBException, AuthorizationException
plainAuth
in interface AuthRepository
user
- password
- boolean
value true
on successful
authentication, false
on authentication failure.AuthorizationException
TigaseDBException
UserNotFoundException
public void queryAuth(Map<String,Object> authProps)
queryAuth
in interface AuthRepository
authProps
- public void removeData(tigase.xmpp.BareJID 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(tigase.xmpp.BareJID 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(tigase.xmpp.BareJID 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 removeUser(tigase.xmpp.BareJID user)
removeUser
method here.removeUser
in interface AuthRepository
removeUser
in interface UserRepository
user
- a String
valuepublic void setData(tigase.xmpp.BareJID 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(tigase.xmpp.BareJID 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(tigase.xmpp.BareJID 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 updatePassword(tigase.xmpp.BareJID user, String password) throws UserNotFoundException, TigaseDBException
updatePassword
in interface AuthRepository
user
- password
- TigaseDBException
UserNotFoundException
public boolean userExists(tigase.xmpp.BareJID user)
userExists
in interface UserRepository
user
- boolean
valuepublic String getPassword(tigase.xmpp.BareJID user) throws UserNotFoundException, TigaseDBException
getPassword
in interface AuthRepository
UserNotFoundException
TigaseDBException
Copyright © 2014 "Tigase, Inc.". All rights reserved.