org.objectweb.jonas.security.realm.factory.JResourceDS Class Reference

Inherits org.objectweb.jonas.security.realm.factory.JResource, and org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Inheritance diagram for org.objectweb.jonas.security.realm.factory.JResourceDS:

Inheritance graph
[legend]
Collaboration diagram for org.objectweb.jonas.security.realm.factory.JResourceDS:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 JResourceDS () throws Exception
void setDsName (String dsName)
void setUserTable (String userTable)
void setUserTableUsernameCol (String userTableUsernameCol)
void setUserTablePasswordCol (String userTablePasswordCol)
void setRoleTable (String roleTable)
void setRoleTableUsernameCol (String roleTableUsernameCol)
void setRoleTableRolenameCol (String roleTableRolenameCol)
void setAlgorithm (String algorithm)
void setUserPrincipalsQuery (String userPrincipalsQuery)
void setUserRolesQuery (String userRolesQuery)
String getDsName ()
String getUserTable ()
String getUserTableUsernameCol ()
String getUserTablePasswordCol ()
String getRoleTable ()
String getRoleTableUsernameCol ()
String getRoleTableRolenameCol ()
String getAlgorithm ()
String setUserPrincipalsQuery ()
String setUserRolesQuery ()
User findUser (String username) throws JResourceException
boolean isValidUser (User user, String credentials)
ArrayList getArrayListCombinedRoles (User user) throws JResourceException
String toXML ()
String toString ()
Reference getReference () throws NamingException
void removeMBeans () throws JResourceException

Detailed Description

This class extends the JResource class for the Datasource implementation.
Author:
Florent Benoit

Definition at line 54 of file JResourceDS.java.


Constructor & Destructor Documentation

org.objectweb.jonas.security.realm.factory.JResourceDS.JResourceDS  )  throws Exception
 

Constructor. Use the super constructor

Exceptions:
Exception if super constructor fail

Definition at line 125 of file JResourceDS.java.


Member Function Documentation

User org.objectweb.jonas.security.realm.factory.JResourceDS.findUser String  username  )  throws JResourceException [virtual]
 

Check if a user is found and return it

Parameters:
username the wanted user name
Returns:
the user found or null
Exceptions:
JResourceException if there is a SQLException

Implements org.objectweb.jonas.security.realm.factory.JResource.

Definition at line 301 of file JResourceDS.java.

References org.objectweb.jonas.security.realm.principals.User.addRole(), org.objectweb.jonas.security.realm.factory.JResource.getLogger(), org.objectweb.jonas.security.realm.principals.User.setName(), and org.objectweb.jonas.security.realm.principals.User.setPassword().

Here is the call graph for this function:

String org.objectweb.jonas.security.realm.factory.JResourceDS.getAlgorithm  ) 
 

Get the default algorithm

Returns:
the default algorithm

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 275 of file JResourceDS.java.

ArrayList org.objectweb.jonas.security.realm.factory.JResourceDS.getArrayListCombinedRoles User  user  )  throws JResourceException [virtual]
 

Get all the roles (from the roles and from the groups) of the given user

Parameters:
user the given user
Returns:
the array list of all the roles for a given user
Exceptions:
JResourceException if it fails

Implements org.objectweb.jonas.security.realm.factory.JResource.

Definition at line 420 of file JResourceDS.java.

References org.objectweb.jonas.security.realm.principals.User.getArrayRoles(), and org.objectweb.jonas.security.realm.principals.User.setCombinedRoles().

Here is the call graph for this function:

String org.objectweb.jonas.security.realm.factory.JResourceDS.getDsName  ) 
 

Get the name of the resource to use

Returns:
name of the resource

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 219 of file JResourceDS.java.

Reference org.objectweb.jonas.security.realm.factory.JResourceDS.getReference  )  throws NamingException [virtual]
 

Retrieves the Reference of the object. The Reference contains the factory used to create this object and the optional parameters used to configure the factory.

Returns:
the non-null Reference of the object.
Exceptions:
NamingException if a naming exception was encountered while retrieving the reference.

Implements org.objectweb.jonas.security.realm.factory.JResource.

Definition at line 513 of file JResourceDS.java.

References org.objectweb.jonas.security.realm.factory.JResource.getName().

Here is the call graph for this function:

String org.objectweb.jonas.security.realm.factory.JResourceDS.getRoleTable  ) 
 

Get the name of table which have the username/role

Returns:
name of table which have the username/role

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 251 of file JResourceDS.java.

String org.objectweb.jonas.security.realm.factory.JResourceDS.getRoleTableRolenameCol  ) 
 

Get the name of the column of the role of the role table

Returns:
name of the column of the role of the role table

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 267 of file JResourceDS.java.

String org.objectweb.jonas.security.realm.factory.JResourceDS.getRoleTableUsernameCol  ) 
 

Get the name of the column of the username of the role table

Returns:
name of the column of the username of the role table

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 259 of file JResourceDS.java.

String org.objectweb.jonas.security.realm.factory.JResourceDS.getUserTable  ) 
 

Get the name of the table which have the username/password

Returns:
name of the table which have the username/password

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 227 of file JResourceDS.java.

String org.objectweb.jonas.security.realm.factory.JResourceDS.getUserTablePasswordCol  ) 
 

Get the name of column of the password of the user table

Returns:
name of column of the password of the user table

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 243 of file JResourceDS.java.

String org.objectweb.jonas.security.realm.factory.JResourceDS.getUserTableUsernameCol  ) 
 

Get the name of the column of the username of the user table

Returns:
name of the column of the username of the user table

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 235 of file JResourceDS.java.

boolean org.objectweb.jonas.security.realm.factory.JResourceDS.isValidUser User  user,
String  credentials
[virtual]
 

Check if the given credential is the right credential for the given user

Parameters:
user user to check its credentials
credentials the given credentials
Returns:
true if the credential is valid for this user

Implements org.objectweb.jonas.security.realm.factory.JResource.

Definition at line 377 of file JResourceDS.java.

References org.objectweb.jonas.security.realm.principals.User.getHashPassword(), org.objectweb.jonas.security.realm.factory.JResource.getLogger(), org.objectweb.jonas.security.realm.principals.User.getPassword(), and org.objectweb.jonas.security.realm.principals.User.hashPassword.

Here is the call graph for this function:

void org.objectweb.jonas.security.realm.factory.JResourceDS.removeMBeans  )  throws JResourceException [virtual]
 

Remove all the Mbeans used by this resource

Exceptions:
JResourceException if the MBeans can not be removed

Implements org.objectweb.jonas.security.realm.factory.JResource.

Definition at line 735 of file JResourceDS.java.

void org.objectweb.jonas.security.realm.factory.JResourceDS.setAlgorithm String  algorithm  ) 
 

Set the default algorithm to use

Parameters:
algorithm algorithm to be used

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 194 of file JResourceDS.java.

Referenced by org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceDS(), and org.objectweb.jonas.security.realm.factory.JResourceDSFactory.getObjectInstance().

void org.objectweb.jonas.security.realm.factory.JResourceDS.setDsName String  dsName  ) 
 

Set the name of the resource to use

Parameters:
dsName name of the resource

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 134 of file JResourceDS.java.

Referenced by org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceDS(), and org.objectweb.jonas.security.realm.factory.JResourceDSFactory.getObjectInstance().

void org.objectweb.jonas.security.realm.factory.JResourceDS.setRoleTable String  roleTable  ) 
 

Set the name of table which have the username/role

Parameters:
roleTable name of table which have the username/role

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 168 of file JResourceDS.java.

Referenced by org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceDS(), and org.objectweb.jonas.security.realm.factory.JResourceDSFactory.getObjectInstance().

void org.objectweb.jonas.security.realm.factory.JResourceDS.setRoleTableRolenameCol String  roleTableRolenameCol  ) 
 

Set the name of the column of the role of the role table

Parameters:
roleTableRolenameCol name of the column of the role of the role table

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 186 of file JResourceDS.java.

Referenced by org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceDS(), and org.objectweb.jonas.security.realm.factory.JResourceDSFactory.getObjectInstance().

void org.objectweb.jonas.security.realm.factory.JResourceDS.setRoleTableUsernameCol String  roleTableUsernameCol  ) 
 

Set the name of the column of the username of the role table

Parameters:
roleTableUsernameCol name of the column of the username of the role table

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 177 of file JResourceDS.java.

Referenced by org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceDS(), and org.objectweb.jonas.security.realm.factory.JResourceDSFactory.getObjectInstance().

String org.objectweb.jonas.security.realm.factory.JResourceDS.setUserPrincipalsQuery  ) 
 

Gets the user defined query for retrieving principals

Returns:
the user defined query for retrieving principals

Definition at line 283 of file JResourceDS.java.

void org.objectweb.jonas.security.realm.factory.JResourceDS.setUserPrincipalsQuery String  userPrincipalsQuery  ) 
 

Set the user defined query for retrieving principals

Parameters:
userPrincipalsQuery the user defined query for retrieving principals

Definition at line 203 of file JResourceDS.java.

Referenced by org.objectweb.jonas.security.realm.factory.JResourceDSFactory.getObjectInstance().

String org.objectweb.jonas.security.realm.factory.JResourceDS.setUserRolesQuery  ) 
 

Gets the user defined query for retrieving roles

Returns:
the user defined query for retrieving roles

Definition at line 291 of file JResourceDS.java.

void org.objectweb.jonas.security.realm.factory.JResourceDS.setUserRolesQuery String  userRolesQuery  ) 
 

Set the user defined query for retrieving roles

Parameters:
userRolesQuery the user defined query for retrieving roles

Definition at line 211 of file JResourceDS.java.

Referenced by org.objectweb.jonas.security.realm.factory.JResourceDSFactory.getObjectInstance().

void org.objectweb.jonas.security.realm.factory.JResourceDS.setUserTable String  userTable  ) 
 

Set the name of the table which have the username/password

Parameters:
userTable name of the table which have the username/password

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 142 of file JResourceDS.java.

Referenced by org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceDS(), and org.objectweb.jonas.security.realm.factory.JResourceDSFactory.getObjectInstance().

void org.objectweb.jonas.security.realm.factory.JResourceDS.setUserTablePasswordCol String  userTablePasswordCol  ) 
 

Set the name of column of the password of the user table

Parameters:
userTablePasswordCol name of column of the password of the user table

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 160 of file JResourceDS.java.

Referenced by org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceDS(), and org.objectweb.jonas.security.realm.factory.JResourceDSFactory.getObjectInstance().

void org.objectweb.jonas.security.realm.factory.JResourceDS.setUserTableUsernameCol String  userTableUsernameCol  ) 
 

Set the name of the column of the username of the user table

Parameters:
userTableUsernameCol name of the column of the username of the user table

Implements org.objectweb.jonas.security.realm.factory.JResourceDSMBean.

Definition at line 151 of file JResourceDS.java.

Referenced by org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceDS(), and org.objectweb.jonas.security.realm.factory.JResourceDSFactory.getObjectInstance().

String org.objectweb.jonas.security.realm.factory.JResourceDS.toString  ) 
 

The string representation of this realm is the XML

Returns:
XML representation

Definition at line 501 of file JResourceDS.java.

References org.objectweb.jonas.security.realm.principals.User.toXML().

Here is the call graph for this function:

String org.objectweb.jonas.security.realm.factory.JResourceDS.toXML  ) 
 

String representation of the MemoryRealm

Returns:
the xml representation of the MemoryRealm

Definition at line 446 of file JResourceDS.java.

References org.objectweb.jonas.security.realm.factory.JResource.getName(), and org.objectweb.jonas.security.realm.principals.User.toString().

Referenced by org.objectweb.jonas.security.JonasSecurityServiceImpl.addJResourceDS().

Here is the call graph for this function:


The documentation for this class was generated from the following file:
Generated on Tue Feb 15 15:07:45 2005 for JOnAS by  doxygen 1.3.9.1