|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.objectweb.cjdbc.controller.authentication.AuthenticationManager
The AuthenticationManager manages the mapping between virtual
login/password (to the VirtualDatabase) and the real
login/password for each backend.
| Field Summary | |
private VirtualDatabaseUser |
adminUser
Administrator user. |
private java.util.HashMap |
realLogins
HashMap of HashMap of
DatabaseBackendUser objects hashed by the backend name,
hashed by their virtual database login. |
private java.util.ArrayList |
virtualLogins
ArrayList of VirtualDatabaseUser objects. |
| Constructor Summary | |
AuthenticationManager()
Creates a new AuthenticationManager instance. |
|
| Method Summary | |
void |
addRealUser(java.lang.String vLogin,
DatabaseBackendUser rUser)
Associates a new database backend user to a virtual database login. |
void |
addVirtualUser(VirtualDatabaseUser vUser)
Registers a new virtual database user. |
DatabaseBackendUser |
getDatabaseBackendUser(java.lang.String vLogin,
java.lang.String backendName)
Gets the DatabaseBackendUser given a virtual database
login and a database backend logical name. |
java.lang.String |
getInformation()
Method for debugging. |
java.lang.String |
getXmlInformation()
Convert this Authentication manager into xml format |
boolean |
isValidAdminUser(VirtualDatabaseUser user)
Checks whether this administrator user has been registered to this AuthenticationManager or not. |
boolean |
isValidVirtualLogin(java.lang.String vLogin)
Checks whether a given virtual login has been registered to this AuthenticationManager or not. |
boolean |
isValidVirtualUser(VirtualDatabaseUser vUser)
Checks whether a given virtual database user has been registered to this AuthenticationManager or not. |
void |
setAdminUser(VirtualDatabaseUser adminUser)
Sets the administrator user. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private java.util.ArrayList virtualLogins
ArrayList of VirtualDatabaseUser objects.
private java.util.HashMap realLogins
HashMap of HashMap of
DatabaseBackendUser objects hashed by the backend name,
hashed by their virtual database login. A virtual user can have several
real logins, but has only one real login for a given backend.
private VirtualDatabaseUser adminUser
| Constructor Detail |
public AuthenticationManager()
AuthenticationManager instance.
| Method Detail |
public boolean isValidAdminUser(VirtualDatabaseUser user)
AuthenticationManager or not. Returns false
if no admin user has been set.
user - administrator user login/password to check.
true if it matches the registered admin user.public boolean isValidVirtualUser(VirtualDatabaseUser vUser)
AuthenticationManager or not.
vUser - the virtual database user.
true if the user login/password is valid.public boolean isValidVirtualLogin(java.lang.String vLogin)
AuthenticationManager or not.
vLogin - the virtual database login.
true if the virtual database login is valid.public void setAdminUser(VirtualDatabaseUser adminUser)
adminUser - the administor user to set.public void addVirtualUser(VirtualDatabaseUser vUser)
vUser - the VirtualDatabaseUser to register.
public void addRealUser(java.lang.String vLogin,
DatabaseBackendUser rUser)
throws AuthenticationManagerException
vLogin - the virtual database login.rUser - the database backend user to add.
AuthenticationManagerException - if a real user already exists
for this backend.
public DatabaseBackendUser getDatabaseBackendUser(java.lang.String vLogin,
java.lang.String backendName)
DatabaseBackendUser given a virtual database
login and a database backend logical name.
vLogin - virtual database login.backendName - database backend logical name.
DatabaseBackendUser value or null if
not found.public java.lang.String getXmlInformation()
public java.lang.String getInformation()
String value.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||