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

Inherits org.objectweb.jonas.security.realm.factory.JResourceMBean.

Inherited by org.objectweb.jonas.security.realm.factory.JResourceDS, org.objectweb.jonas.security.realm.factory.JResourceLDAP, and org.objectweb.jonas.security.realm.factory.JResourceMemory.

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

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 JResource () throws Exception
void setName (String name)
String getName ()
abstract Reference getReference () throws NamingException
abstract void removeMBeans () throws JResourceException
abstract User findUser (String name) throws JResourceException
abstract boolean isValidUser (User user, String credentials)
abstract ArrayList getArrayListCombinedRoles (User user) throws JResourceException
Hashtable getUsers ()
void saveConfig ()
void setUsers (Hashtable users)
void clearCache ()

Static Public Member Functions

Logger getLogger ()
void setLogger (Logger logger)

Protected Member Functions

MBeanServer getMBeanServer ()
long getSequenceNumber ()

Detailed Description

This class implements JOnAS realm factory objects. It is build from an xml file by the security service of JOnAS.
Author:
Florent Benoit

Definition at line 57 of file JResource.java.


Constructor & Destructor Documentation

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

Constructor

Exceptions:
Exception if a service can't be retrieved

Definition at line 93 of file JResource.java.

References org.objectweb.jonas.service.ServiceManager.getJmxService(), and org.objectweb.jonas.service.ServiceManager.getSecurityService().

Here is the call graph for this function:


Member Function Documentation

void org.objectweb.jonas.security.realm.factory.JResource.clearCache  ) 
 

Clear the cache

Definition at line 239 of file JResource.java.

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

Here is the call graph for this function:

abstract User org.objectweb.jonas.security.realm.factory.JResource.findUser String  name  )  throws JResourceException [pure virtual]
 

Check if a user is found and return it

Parameters:
name the wanted user name
Returns:
the user found or null
Exceptions:
JResourceException if there is an error during the search

Implemented in org.objectweb.jonas.security.realm.factory.JResourceDS, org.objectweb.jonas.security.realm.factory.JResourceLDAP, and org.objectweb.jonas.security.realm.factory.JResourceMemory.

Referenced by org.objectweb.jonas.security.realm.web.catalina50.Standard.authenticate(), and org.objectweb.jonas.security.auth.spi.JResourceLoginModule.login().

abstract ArrayList org.objectweb.jonas.security.realm.factory.JResource.getArrayListCombinedRoles User  user  )  throws JResourceException [pure 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

Implemented in org.objectweb.jonas.security.realm.factory.JResourceDS, org.objectweb.jonas.security.realm.factory.JResourceLDAP, and org.objectweb.jonas.security.realm.factory.JResourceMemory.

Referenced by org.objectweb.jonas.security.realm.web.catalina50.Standard.authenticate(), and org.objectweb.jonas.security.auth.spi.JResourceLoginModule.login().

Logger org.objectweb.jonas.security.realm.factory.JResource.getLogger  )  [static]
 

Returns:
Returns the logger.

Definition at line 220 of file JResource.java.

Referenced by org.objectweb.jonas.security.realm.factory.JResourceMemory.addGroup(), org.objectweb.jonas.security.realm.factory.JResourceMemory.addRole(), org.objectweb.jonas.security.realm.factory.JResourceMemory.addUser(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.findUser(), org.objectweb.jonas.security.realm.factory.JResourceDS.findUser(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.getArrayListCombinedRoles(), org.objectweb.jonas.security.realm.factory.JResourceMemory.getReference(), org.objectweb.jonas.security.realm.factory.JResourceMemory.isValidUser(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.isValidUser(), org.objectweb.jonas.security.realm.factory.JResourceDS.isValidUser(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.isValidUserBind(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.isValidUserCompare(), org.objectweb.jonas.security.realm.factory.JResourceMemory.removeGroup(), org.objectweb.jonas.security.realm.factory.JResourceMemory.removeMBeans(), org.objectweb.jonas.security.realm.factory.JResourceMemory.removeRole(), and org.objectweb.jonas.security.realm.factory.JResourceMemory.removeUser().

MBeanServer org.objectweb.jonas.security.realm.factory.JResource.getMBeanServer  )  [protected]
 

Get the MBean server

Returns:
the MBean server

Definition at line 131 of file JResource.java.

Referenced by org.objectweb.jonas.security.realm.factory.JResourceMemory.addGroup(), org.objectweb.jonas.security.realm.factory.JResourceMemory.addRole(), org.objectweb.jonas.security.realm.factory.JResourceMemory.addUser(), org.objectweb.jonas.security.realm.factory.JResourceMemory.removeGroup(), org.objectweb.jonas.security.realm.factory.JResourceMemory.removeMBeans(), org.objectweb.jonas.security.realm.factory.JResourceMemory.removeRole(), and org.objectweb.jonas.security.realm.factory.JResourceMemory.removeUser().

String org.objectweb.jonas.security.realm.factory.JResource.getName  ) 
 

Get the name of this resource

Returns:
the name of this resource

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

Definition at line 123 of file JResource.java.

Referenced by org.objectweb.jonas.security.JonasSecurityServiceImpl.bindResource(), org.objectweb.jonas.security.realm.factory.JResourceMemory.getReference(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.getReference(), org.objectweb.jonas.security.realm.factory.JResourceDS.getReference(), org.objectweb.jonas.security.realm.factory.JResource.saveConfig(), org.objectweb.jonas.security.realm.factory.JResourceMemory.toXML(), org.objectweb.jonas.security.realm.factory.JResourceLDAP.toXML(), and org.objectweb.jonas.security.realm.factory.JResourceDS.toXML().

abstract Reference org.objectweb.jonas.security.realm.factory.JResource.getReference  )  throws NamingException [pure 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.

Implemented in org.objectweb.jonas.security.realm.factory.JResourceDS, org.objectweb.jonas.security.realm.factory.JResourceLDAP, and org.objectweb.jonas.security.realm.factory.JResourceMemory.

long org.objectweb.jonas.security.realm.factory.JResource.getSequenceNumber  )  [protected]
 

Return a sequence number and increase this number

Returns:
a sequence number

Definition at line 187 of file JResource.java.

Referenced by org.objectweb.jonas.security.realm.factory.JResource.saveConfig().

Hashtable org.objectweb.jonas.security.realm.factory.JResource.getUsers  ) 
 

Return users

Returns:
Return users

Definition at line 179 of file JResource.java.

Referenced by org.objectweb.jonas.security.realm.factory.JResourceMemory.addUser(), org.objectweb.jonas.security.realm.factory.JResourceMemory.findUser(), org.objectweb.jonas.security.realm.factory.JResourceMemory.getReference(), org.objectweb.jonas.security.realm.factory.JResourceMemory.removeMBeans(), org.objectweb.jonas.security.realm.factory.JResourceMemory.removeUser(), and org.objectweb.jonas.security.realm.factory.JResourceMemory.toXML().

abstract boolean org.objectweb.jonas.security.realm.factory.JResource.isValidUser User  user,
String  credentials
[pure 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

Implemented in org.objectweb.jonas.security.realm.factory.JResourceDS, org.objectweb.jonas.security.realm.factory.JResourceLDAP, and org.objectweb.jonas.security.realm.factory.JResourceMemory.

Referenced by org.objectweb.jonas.security.realm.web.catalina50.Standard.authenticate(), and org.objectweb.jonas.security.auth.spi.JResourceLoginModule.login().

abstract void org.objectweb.jonas.security.realm.factory.JResource.removeMBeans  )  throws JResourceException [pure virtual]
 

Remove all the Mbeans used by this resource

Exceptions:
JResourceException if the MBeans can not be removed

Implemented in org.objectweb.jonas.security.realm.factory.JResourceDS, org.objectweb.jonas.security.realm.factory.JResourceLDAP, and org.objectweb.jonas.security.realm.factory.JResourceMemory.

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

void org.objectweb.jonas.security.realm.factory.JResource.saveConfig  ) 
 

Update and save configuration

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

Definition at line 194 of file JResource.java.

References org.objectweb.jonas.security.realm.factory.JResource.getName(), org.objectweb.jonas.security.realm.factory.JResource.getSequenceNumber(), and org.objectweb.jonas.security.SecurityService.toXML().

Here is the call graph for this function:

void org.objectweb.jonas.security.realm.factory.JResource.setLogger Logger  logger  )  [static]
 

Parameters:
logger The logger to set.

Definition at line 226 of file JResource.java.

void org.objectweb.jonas.security.realm.factory.JResource.setName String  name  ) 
 

Set the name of this resource

Parameters:
name Name of the resource

Definition at line 115 of file JResource.java.

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

void org.objectweb.jonas.security.realm.factory.JResource.setUsers Hashtable  users  ) 
 

Parameters:
users The users to set.

Definition at line 232 of file JResource.java.

Referenced by org.objectweb.jonas.security.realm.factory.JResource.clearCache(), and org.objectweb.jonas.security.realm.factory.JResourceMemoryFactory.getObjectInstance().


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