|
||||||||||
| 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 java.lang.String |
DEF_MAXIDS_TBL
|
static java.lang.String |
DEF_NODES_TBL
|
static java.lang.String |
DEF_PAIRS_TBL
|
static java.lang.String |
DEF_ROOT_NODE
|
static java.lang.String |
DEF_USERS_TBL
|
| Fields inherited from interface tigase.db.UserAuthRepository |
|---|
DATA_KEY, MACHANISM_KEY, PROTOCOL_KEY, PROTOCOL_VAL_NONSASL, PROTOCOL_VAL_SASL, REALM_KEY, RESULT_KEY, SERVER_NAME_KEY, USER_ID_KEY |
| Constructor Summary | |
|---|---|
JDBCRepository()
|
|
| Method Summary | |
|---|---|
void |
addDataList(java.lang.String user_id,
java.lang.String subnode,
java.lang.String key,
java.lang.String[] list)
Describe addDataList method here. |
void |
addUser(java.lang.String user_id)
Describe addUser method here. |
void |
addUser(java.lang.String user,
java.lang.String password)
Describe addUser method here. |
boolean |
digestAuth(java.lang.String user,
java.lang.String digest,
java.lang.String id,
java.lang.String alg)
Describe digestAuth method here. |
java.lang.String |
getData(java.lang.String user_id,
java.lang.String key)
Describe getData method here. |
java.lang.String |
getData(java.lang.String user_id,
java.lang.String subnode,
java.lang.String key)
Describe getData method here. |
java.lang.String |
getData(java.lang.String user_id,
java.lang.String subnode,
java.lang.String key,
java.lang.String def)
Describe getData method here. |
java.lang.String[] |
getDataList(java.lang.String user_id,
java.lang.String subnode,
java.lang.String key)
Describe getDataList method here. |
java.lang.String[] |
getKeys(java.lang.String user_id)
Describe getKeys method here. |
java.lang.String[] |
getKeys(java.lang.String user_id,
java.lang.String subnode)
Describe getKeys method here. |
java.lang.String |
getResourceUri()
|
java.lang.String[] |
getSubnodes(java.lang.String user_id)
Describe getSubnodes method here. |
java.lang.String[] |
getSubnodes(java.lang.String user_id,
java.lang.String subnode)
Describe getSubnodes method here. |
java.util.List<java.lang.String> |
getUsers()
Describe getUsers method here. |
void |
initRepository(java.lang.String connection_str)
Describe initRepository method here. |
void |
logout(java.lang.String user)
|
boolean |
otherAuth(java.util.Map<java.lang.String,java.lang.Object> props)
Describe otherAuth method here. |
boolean |
plainAuth(java.lang.String user,
java.lang.String password)
Describe plainAuth method here. |
void |
queryAuth(java.util.Map<java.lang.String,java.lang.Object> authProps)
|
void |
removeData(java.lang.String user_id,
java.lang.String key)
Describe removeData method here. |
void |
removeData(java.lang.String user_id,
java.lang.String subnode,
java.lang.String key)
Describe removeData method here. |
void |
removeSubnode(java.lang.String user_id,
java.lang.String subnode)
Describe removeSubnode method here. |
void |
removeUser(java.lang.String user_id)
Describe removeUser method here. |
void |
setData(java.lang.String user_id,
java.lang.String key,
java.lang.String value)
Describe setData method here. |
void |
setData(java.lang.String user_id,
java.lang.String subnode,
java.lang.String key,
java.lang.String value)
Describe setData method here. |
void |
setDataList(java.lang.String user_id,
java.lang.String subnode,
java.lang.String key,
java.lang.String[] list)
Describe setDataList method here. |
void |
updatePassword(java.lang.String user,
java.lang.String password)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEF_USERS_TBL
public static final java.lang.String DEF_NODES_TBL
public static final java.lang.String DEF_PAIRS_TBL
public static final java.lang.String DEF_MAXIDS_TBL
public static final java.lang.String DEF_ROOT_NODE
| Constructor Detail |
|---|
public JDBCRepository()
| Method Detail |
|---|
public java.lang.String getResourceUri()
getResourceUri in interface UserAuthRepositorygetResourceUri in interface UserRepository
public void initRepository(java.lang.String connection_str)
throws DBInitException
initRepository method here.
initRepository in interface UserAuthRepositoryinitRepository in interface UserRepositoryconnection_str - a String value
DBInitException
public java.util.List<java.lang.String> getUsers()
throws TigaseDBException
getUsers method here.
getUsers in interface UserRepositoryList value
TigaseDBException
public void addUser(java.lang.String user_id)
throws UserExistsException,
TigaseDBException
addUser method here.
addUser in interface UserRepositoryuser_id - a String value
UserExistsException - if an error occurs
TigaseDBException
public void removeUser(java.lang.String user_id)
throws UserNotFoundException,
TigaseDBException
removeUser method here.
removeUser in interface UserAuthRepositoryremoveUser in interface UserRepositoryuser_id - a String value
UserNotFoundException - if an error occurs
TigaseDBException
public java.lang.String[] getDataList(java.lang.String user_id,
java.lang.String subnode,
java.lang.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 java.lang.String[] getSubnodes(java.lang.String user_id,
java.lang.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 java.lang.String[] getSubnodes(java.lang.String 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 void removeSubnode(java.lang.String user_id,
java.lang.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 setDataList(java.lang.String user_id,
java.lang.String subnode,
java.lang.String key,
java.lang.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 addDataList(java.lang.String user_id,
java.lang.String subnode,
java.lang.String key,
java.lang.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 java.lang.String[] getKeys(java.lang.String user_id,
java.lang.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 java.lang.String[] getKeys(java.lang.String user_id)
throws UserNotFoundException,
TigaseDBException
getKeys method here.
getKeys in interface UserRepositoryuser_id - a String value
String[] value
UserNotFoundException - if an error occurs
TigaseDBException
public java.lang.String getData(java.lang.String user_id,
java.lang.String subnode,
java.lang.String key,
java.lang.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 java.lang.String getData(java.lang.String user_id,
java.lang.String subnode,
java.lang.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 java.lang.String getData(java.lang.String user_id,
java.lang.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 void setData(java.lang.String user_id,
java.lang.String subnode,
java.lang.String key,
java.lang.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(java.lang.String user_id,
java.lang.String key,
java.lang.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 removeData(java.lang.String user_id,
java.lang.String subnode,
java.lang.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(java.lang.String user_id,
java.lang.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 boolean plainAuth(java.lang.String user,
java.lang.String password)
throws UserNotFoundException,
TigaseDBException,
AuthorizationException
plainAuth method here.
plainAuth in interface UserAuthRepositoryuser - a String valuepassword - a String value
boolean value
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
AuthorizationException
public boolean digestAuth(java.lang.String user,
java.lang.String digest,
java.lang.String id,
java.lang.String alg)
throws UserNotFoundException,
TigaseDBException,
AuthorizationException
digestAuth method here.
digestAuth in interface UserAuthRepositoryuser - a String valuedigest - a String valueid - a String valuealg - a String value
boolean value
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
AuthorizationException
public boolean otherAuth(java.util.Map<java.lang.String,java.lang.Object> props)
throws UserNotFoundException,
TigaseDBException,
AuthorizationException
otherAuth method here.
otherAuth in interface UserAuthRepositoryprops - a Map value
boolean value
UserNotFoundException - if an error occurs
TigaseDBException - if an error occurs
AuthorizationException - if an error occurs
public void updatePassword(java.lang.String user,
java.lang.String password)
throws TigaseDBException
updatePassword in interface UserAuthRepositoryTigaseDBException
public void logout(java.lang.String user)
throws UserNotFoundException,
TigaseDBException
logout in interface UserAuthRepositoryUserNotFoundException
TigaseDBException
public void addUser(java.lang.String user,
java.lang.String password)
throws UserExistsException,
TigaseDBException
addUser method here.
addUser in interface UserAuthRepositoryuser - a String valuepassword - a String value
UserExistsException - if an error occurs
TigaseDBException - if an error occurspublic void queryAuth(java.util.Map<java.lang.String,java.lang.Object> authProps)
queryAuth in interface UserAuthRepository
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||