|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttigase.db.jdbc.JDBCRepository
public class JDBCRepository
Not synchronized implementation! Musn't be used by more than one thread at the same time.
Thanks to Daniele for better unique IDs handling. Created: Thu Oct 26 11:48:53 2006
| Field Summary | |
|---|---|
static String |
CURRENT_DB_SCHEMA_VER
Field description |
static String |
DEF_MAXIDS_TBL
Field description |
static String |
DEF_NODES_TBL
Field description |
static String |
DEF_PAIRS_TBL
Field description |
static String |
DEF_ROOT_NODE
Field description |
static String |
DEF_USERS_TBL
Field description |
static String |
DERBY_GETSCHEMAVER_QUERY
Field description |
static String |
JDBC_GETSCHEMAVER_QUERY
Field description |
static String |
SCHEMA_UPGRADE_LINK
Field description |
| Fields inherited from interface tigase.db.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 Summary | |
|---|---|
JDBCRepository()
|
|
| Method Summary | |
|---|---|
void |
addDataList(tigase.xmpp.BareJID user_id,
String subnode,
String key,
String[] list)
Describe addDataList method here. |
void |
addUser(tigase.xmpp.BareJID user_id)
Describe addUser method here. |
void |
addUser(tigase.xmpp.BareJID user,
String password)
Describe addUser method here. |
boolean |
digestAuth(tigase.xmpp.BareJID user,
String digest,
String id,
String alg)
Deprecated. |
String |
getData(tigase.xmpp.BareJID user_id,
String key)
Describe getData method here. |
String |
getData(tigase.xmpp.BareJID user_id,
String subnode,
String key)
Describe getData method here. |
String |
getData(tigase.xmpp.BareJID user_id,
String subnode,
String key,
String def)
Describe getData method here. |
String[] |
getDataList(tigase.xmpp.BareJID user_id,
String subnode,
String key)
Describe getDataList method here. |
String[] |
getKeys(tigase.xmpp.BareJID user_id)
Describe getKeys method here. |
String[] |
getKeys(tigase.xmpp.BareJID user_id,
String subnode)
Describe getKeys method here. |
String |
getResourceUri()
Method description |
String[] |
getSubnodes(tigase.xmpp.BareJID user_id)
Describe getSubnodes method here. |
String[] |
getSubnodes(tigase.xmpp.BareJID user_id,
String subnode)
Describe getSubnodes method here. |
List<tigase.xmpp.BareJID> |
getUsers()
getUsers method is thread safe. |
long |
getUsersCount()
getUsersCount method is thread safe. |
long |
getUsersCount(String domain)
Method description |
long |
getUserUID(tigase.xmpp.BareJID user_id)
Method description |
long |
getUserUID(DataRepository repo,
tigase.xmpp.BareJID user_id)
Method description |
void |
initRepository(String connection_str,
Map<String,String> params)
Describe initRepository method here. |
void |
logout(tigase.xmpp.BareJID user)
Method description |
boolean |
otherAuth(Map<String,Object> props)
Describe otherAuth method here. |
boolean |
plainAuth(tigase.xmpp.BareJID user,
String password)
Deprecated. |
void |
queryAuth(Map<String,Object> authProps)
Method description |
void |
removeData(tigase.xmpp.BareJID user_id,
String key)
Describe removeData method here. |
void |
removeData(tigase.xmpp.BareJID user_id,
String subnode,
String key)
Describe removeData method here. |
void |
removeSubnode(tigase.xmpp.BareJID user_id,
String subnode)
Describe removeSubnode method here. |
void |
removeUser(tigase.xmpp.BareJID user_id)
removeUser method is thread safe. |
void |
setData(tigase.xmpp.BareJID user_id,
String key,
String value)
Describe setData method here. |
void |
setData(tigase.xmpp.BareJID user_id,
String subnode,
String key,
String value)
Describe setData method here. |
void |
setDataList(tigase.xmpp.BareJID user_id,
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CURRENT_DB_SCHEMA_VER
public static final String DEF_MAXIDS_TBL
public static final String DEF_NODES_TBL
public static final String DEF_PAIRS_TBL
public static final String DEF_ROOT_NODE
public static final String DEF_USERS_TBL
public static final String DERBY_GETSCHEMAVER_QUERY
public static final String JDBC_GETSCHEMAVER_QUERY
public static final String SCHEMA_UPGRADE_LINK
| Constructor Detail |
|---|
public JDBCRepository()
| Method Detail |
|---|
public void addDataList(tigase.xmpp.BareJID user_id,
String subnode,
String key,
String[] list)
throws UserNotFoundException,
TigaseDBException
addDataList method here.
addDataList in interface UserRepositoryuser_id - a String valuesubnode - a String valuekey - a String valuelist - a String[] value
UserNotFoundException - if an error occurs
TigaseDBException
public void addUser(tigase.xmpp.BareJID user_id)
throws UserExistsException,
TigaseDBException
addUser method here.
addUser in interface UserRepositoryuser_id - a String value
UserExistsException - if an error occurs
TigaseDBException
public void addUser(tigase.xmpp.BareJID user,
String password)
throws UserExistsException,
TigaseDBException
addUser method here.
addUser in interface AuthRepositoryuser - a String valuepassword - a String value
UserExistsException - if an error occurs
TigaseDBException - if an error occurs
@Deprecated
public boolean digestAuth(tigase.xmpp.BareJID user,
String digest,
String id,
String alg)
throws UserNotFoundException,
TigaseDBException,
AuthorizationException
digestAuth method here.
digestAuth in interface AuthRepositoryuser - a String valuedigest - a String valueid - a String valuealg - a String value
boolean value
AuthorizationException
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
public String getData(tigase.xmpp.BareJID user_id,
String subnode,
String key,
String def)
throws UserNotFoundException,
TigaseDBException
getData method here.
getData in interface UserRepositoryuser_id - a String valuesubnode - a String valuekey - a String valuedef - a String value
String value
UserNotFoundException - if an error occurs
TigaseDBException
public String getData(tigase.xmpp.BareJID user_id,
String subnode,
String key)
throws UserNotFoundException,
TigaseDBException
getData method here.
getData in interface UserRepositoryuser_id - a String valuesubnode - a String valuekey - a String value
String value
UserNotFoundException - if an error occurs
TigaseDBException
public String getData(tigase.xmpp.BareJID user_id,
String key)
throws UserNotFoundException,
TigaseDBException
getData method here.
getData in interface UserRepositoryuser_id - a String valuekey - a String value
String value
UserNotFoundException - if an error occurs
TigaseDBException
public String[] getDataList(tigase.xmpp.BareJID user_id,
String subnode,
String key)
throws UserNotFoundException,
TigaseDBException
getDataList method here.
getDataList in interface UserRepositoryuser_id - a String valuesubnode - a String valuekey - a String value
String[] value
UserNotFoundException - if an error occurs
TigaseDBException
public String[] getKeys(tigase.xmpp.BareJID user_id,
String subnode)
throws UserNotFoundException,
TigaseDBException
getKeys method here.
getKeys in interface UserRepositoryuser_id - a String valuesubnode - a String value
String[] value
UserNotFoundException - if an error occurs
TigaseDBException
public String[] getKeys(tigase.xmpp.BareJID user_id)
throws UserNotFoundException,
TigaseDBException
getKeys method here.
getKeys in interface UserRepositoryuser_id - a String value
String[] value
UserNotFoundException - if an error occurs
TigaseDBExceptionpublic String getResourceUri()
getResourceUri in interface AuthRepositorygetResourceUri in interface UserRepository
public String[] getSubnodes(tigase.xmpp.BareJID user_id,
String subnode)
throws UserNotFoundException,
TigaseDBException
getSubnodes method here.
getSubnodes in interface UserRepositoryuser_id - a String valuesubnode - a String value
String[] value
UserNotFoundException - if an error occurs
TigaseDBException
public String[] getSubnodes(tigase.xmpp.BareJID user_id)
throws UserNotFoundException,
TigaseDBException
getSubnodes method here.
getSubnodes in interface UserRepositoryuser_id - a String value
String[] value
UserNotFoundException - if an error occurs
TigaseDBException
public long getUserUID(tigase.xmpp.BareJID user_id)
throws TigaseDBException
getUserUID in interface UserRepositoryuser_id -
TigaseDBException
public long getUserUID(DataRepository repo,
tigase.xmpp.BareJID user_id)
throws SQLException
repo - user_id -
SQLException
public List<tigase.xmpp.BareJID> getUsers()
throws TigaseDBException
getUsers method is thread safe.
getUsers in interface UserRepositoryList of user IDs from database.
TigaseDBExceptionpublic long getUsersCount()
getUsersCount method is thread safe. It uses local variable
for storing Statement.
getUsersCount in interface AuthRepositorygetUsersCount in interface UserRepositorylong number of user accounts in database.public long getUsersCount(String domain)
getUsersCount in interface AuthRepositorygetUsersCount in interface UserRepositorydomain -
public void initRepository(String connection_str,
Map<String,String> params)
throws DBInitException
initRepository method here.
initRepository in interface AuthRepositoryinitRepository in interface UserRepositoryconnection_str - a String valueparams -
DBInitException
public void logout(tigase.xmpp.BareJID user)
throws UserNotFoundException,
TigaseDBException
logout in interface AuthRepositoryuser -
TigaseDBException
UserNotFoundException
public boolean otherAuth(Map<String,Object> props)
throws UserNotFoundException,
TigaseDBException,
AuthorizationException
otherAuth method here.
otherAuth in interface AuthRepositoryprops - a Map value
boolean value
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
AuthorizationException - if an error occurs
@Deprecated
public boolean plainAuth(tigase.xmpp.BareJID user,
String password)
throws UserNotFoundException,
TigaseDBException,
AuthorizationException
plainAuth method here.
plainAuth in interface AuthRepositoryuser - a String valuepassword - a String value
boolean value
AuthorizationException
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurspublic void queryAuth(Map<String,Object> authProps)
queryAuth in interface AuthRepositoryauthProps -
public void removeData(tigase.xmpp.BareJID user_id,
String subnode,
String key)
throws UserNotFoundException,
TigaseDBException
removeData method here.
removeData in interface UserRepositoryuser_id - a String valuesubnode - a String valuekey - a String value
UserNotFoundException - if an error occurs
TigaseDBException
public void removeData(tigase.xmpp.BareJID user_id,
String key)
throws UserNotFoundException,
TigaseDBException
removeData method here.
removeData in interface UserRepositoryuser_id - a String valuekey - a String value
UserNotFoundException - if an error occurs
TigaseDBException
public void removeSubnode(tigase.xmpp.BareJID user_id,
String subnode)
throws UserNotFoundException,
TigaseDBException
removeSubnode method here.
removeSubnode in interface UserRepositoryuser_id - a String valuesubnode - a String value
UserNotFoundException - if an error occurs
TigaseDBException
public void removeUser(tigase.xmpp.BareJID user_id)
throws UserNotFoundException,
TigaseDBException
removeUser method is thread safe. It uses local variable for
storing Statement.
removeUser in interface AuthRepositoryremoveUser in interface UserRepositoryuser_id - a String value the user Jabber ID.
TigaseDBException
UserNotFoundException - if an error occurs
public void setData(tigase.xmpp.BareJID user_id,
String subnode,
String key,
String value)
throws UserNotFoundException,
TigaseDBException
setData method here.
setData in interface UserRepositoryuser_id - a String valuesubnode - a String valuekey - a String valuevalue - a String value
UserNotFoundException - if an error occurs
TigaseDBException
public void setData(tigase.xmpp.BareJID user_id,
String key,
String value)
throws UserNotFoundException,
TigaseDBException
setData method here.
setData in interface UserRepositoryuser_id - a String valuekey - a String valuevalue - a String value
UserNotFoundException - if an error occurs
TigaseDBException
public void setDataList(tigase.xmpp.BareJID user_id,
String subnode,
String key,
String[] list)
throws UserNotFoundException,
TigaseDBException
setDataList method here.
setDataList in interface UserRepositoryuser_id - a String valuesubnode - a String valuekey - a String valuelist - a String[] value
UserNotFoundException - if an error occurs
TigaseDBException
public void updatePassword(tigase.xmpp.BareJID user,
String password)
throws TigaseDBException
updatePassword in interface AuthRepositoryuser - password -
TigaseDBException
UserNotFoundExceptionpublic boolean userExists(tigase.xmpp.BareJID user)
userExists in interface UserRepositoryuser -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||