public class UserRepositoryMDImpl extends Object implements UserRepository
Repository.Meta
Constructor and Description |
---|
UserRepositoryMDImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addDataList(tigase.xmpp.BareJID user,
String subnode,
String key,
String[] list)
Method description
|
void |
addRepo(String domain,
UserRepository repo)
Method description
|
void |
addUser(tigase.xmpp.BareJID user)
Method description
|
String |
getData(tigase.xmpp.BareJID user,
String key)
Method description
|
String |
getData(tigase.xmpp.BareJID user,
String subnode,
String key)
Method description
|
String |
getData(tigase.xmpp.BareJID user,
String subnode,
String key,
String def)
Method description
|
String[] |
getDataList(tigase.xmpp.BareJID user,
String subnode,
String key)
Method description
|
String[] |
getKeys(tigase.xmpp.BareJID user)
Method description
|
String[] |
getKeys(tigase.xmpp.BareJID user,
String subnode)
Method description
|
UserRepository |
getRepo(String domain)
Method description
|
String |
getResourceUri()
Method description
|
String[] |
getSubnodes(tigase.xmpp.BareJID user)
Method description
|
String[] |
getSubnodes(tigase.xmpp.BareJID user,
String subnode)
Method description
|
List<tigase.xmpp.BareJID> |
getUsers()
Method description
|
long |
getUsersCount()
Method description
|
long |
getUsersCount(String domain)
Method description
|
long |
getUserUID(tigase.xmpp.BareJID user)
Method description
|
void |
initRepository(String resource_uri,
Map<String,String> params)
Method description
|
void |
removeData(tigase.xmpp.BareJID user,
String key)
Method description
|
void |
removeData(tigase.xmpp.BareJID user,
String subnode,
String key)
Method description
|
UserRepository |
removeRepo(String domain)
Method description
|
void |
removeSubnode(tigase.xmpp.BareJID user,
String subnode)
Method description
|
void |
removeUser(tigase.xmpp.BareJID user)
Method description
|
void |
setData(tigase.xmpp.BareJID user,
String key,
String value)
Method description
|
void |
setData(tigase.xmpp.BareJID user,
String subnode,
String key,
String value)
Method description
|
void |
setDataList(tigase.xmpp.BareJID user,
String subnode,
String key,
String[] list)
Method description
|
void |
setDefault(UserRepository repo)
Method description
|
boolean |
userExists(tigase.xmpp.BareJID user)
Method description
|
public void addDataList(tigase.xmpp.BareJID user, String subnode, String key, String[] list) throws UserNotFoundException, TigaseDBException
addDataList
in interface UserRepository
user
- subnode
- key
- list
- TigaseDBException
UserNotFoundException
public void addRepo(String domain, UserRepository repo)
domain
- repo
- public void addUser(tigase.xmpp.BareJID user) throws UserExistsException, TigaseDBException
addUser
in interface UserRepository
user
- TigaseDBException
UserExistsException
public String getData(tigase.xmpp.BareJID user, String subnode, String key, String def) throws UserNotFoundException, TigaseDBException
getData
in interface UserRepository
user
- subnode
- key
- def
- String
valueTigaseDBException
UserNotFoundException
public String getData(tigase.xmpp.BareJID user, String subnode, String key) throws UserNotFoundException, TigaseDBException
getData
in interface UserRepository
user
- subnode
- key
- String
valueTigaseDBException
UserNotFoundException
public String getData(tigase.xmpp.BareJID user, String key) throws UserNotFoundException, TigaseDBException
getData
in interface UserRepository
user
- key
- String
valueTigaseDBException
UserNotFoundException
public String[] getDataList(tigase.xmpp.BareJID user, String subnode, String key) throws UserNotFoundException, TigaseDBException
getDataList
in interface UserRepository
user
- subnode
- key
- String[]
valueTigaseDBException
UserNotFoundException
public String[] getKeys(tigase.xmpp.BareJID user, String subnode) throws UserNotFoundException, TigaseDBException
getKeys
in interface UserRepository
user
- subnode
- String[]
valueTigaseDBException
UserNotFoundException
public String[] getKeys(tigase.xmpp.BareJID user) throws UserNotFoundException, TigaseDBException
getKeys
in interface UserRepository
user
- String[]
valueTigaseDBException
UserNotFoundException
public UserRepository getRepo(String domain)
domain
- public String getResourceUri()
getResourceUri
in interface UserRepository
String
value representing database connection string.public String[] getSubnodes(tigase.xmpp.BareJID user, String subnode) throws UserNotFoundException, TigaseDBException
getSubnodes
in interface UserRepository
user
- subnode
- String[]
value is an array of all direct subnodes.TigaseDBException
UserNotFoundException
public String[] getSubnodes(tigase.xmpp.BareJID user) throws UserNotFoundException, TigaseDBException
getSubnodes
in interface UserRepository
user
- String[]
value is an array of all root
nodes for given user.TigaseDBException
UserNotFoundException
public long getUserUID(tigase.xmpp.BareJID user) throws TigaseDBException
getUserUID
in interface UserRepository
user
- TigaseDBException
public List<tigase.xmpp.BareJID> getUsers() throws TigaseDBException
getUsers
in interface UserRepository
TigaseDBException
public long getUsersCount()
getUsersCount
in interface UserRepository
long
number of registered users in the repository.public long getUsersCount(String domain)
getUsersCount
in interface UserRepository
domain
- long
number of registered users in the repository.public void initRepository(String resource_uri, Map<String,String> params) throws DBInitException
initRepository
in interface Repository
resource_uri
- params
- DBInitException
public void removeData(tigase.xmpp.BareJID user, String subnode, String key) throws UserNotFoundException, TigaseDBException
removeData
in interface UserRepository
user
- subnode
- key
- TigaseDBException
UserNotFoundException
public void removeData(tigase.xmpp.BareJID user, String key) throws UserNotFoundException, TigaseDBException
removeData
in interface UserRepository
user
- key
- TigaseDBException
UserNotFoundException
public UserRepository removeRepo(String domain)
domain
- public void removeSubnode(tigase.xmpp.BareJID user, String subnode) throws UserNotFoundException, TigaseDBException
removeSubnode
in interface UserRepository
user
- subnode
- TigaseDBException
UserNotFoundException
public void removeUser(tigase.xmpp.BareJID user) throws UserNotFoundException, TigaseDBException
removeUser
in interface UserRepository
user
- TigaseDBException
UserNotFoundException
public void setData(tigase.xmpp.BareJID user, String subnode, String key, String value) throws UserNotFoundException, TigaseDBException
setData
in interface UserRepository
user
- subnode
- key
- value
- TigaseDBException
UserNotFoundException
public void setData(tigase.xmpp.BareJID user, String key, String value) throws UserNotFoundException, TigaseDBException
setData
in interface UserRepository
user
- key
- value
- TigaseDBException
UserNotFoundException
public void setDataList(tigase.xmpp.BareJID user, String subnode, String key, String[] list) throws UserNotFoundException, TigaseDBException
setDataList
in interface UserRepository
user
- subnode
- key
- list
- TigaseDBException
UserNotFoundException
public void setDefault(UserRepository repo)
repo
- public boolean userExists(tigase.xmpp.BareJID user)
userExists
in interface UserRepository
user
- boolean
valueCopyright © 2014 "Tigase, Inc.". All rights reserved.