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

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

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

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 JResourceMemory () throws Exception
void addUser (User user) throws Exception
void addGroup (Group group) throws Exception
void addRole (Role role) throws Exception
User findUser (String name) throws JResourceException
boolean isValidUser (User user, String credentials)
Hashtable getGroups ()
Hashtable getRoles ()
ArrayList getArrayListCombinedRoles (User user) throws JResourceException
void setGroups (Hashtable groups)
void setRoles (Hashtable roles)
void addUser (String username, String password) throws Exception
void addGroup (String groupname) throws Exception
void addRole (String rolename) throws Exception
void removeUser (String username) throws Exception
void removeGroup (String groupname) throws Exception
void removeRole (String rolename) throws Exception
String toXML ()
String toString ()
Reference getReference () throws NamingException
String[] listRoles ()
String[] listGroups ()
void removeMBeans () throws JResourceException

Detailed Description

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

Definition at line 52 of file JResourceMemory.java.


Constructor & Destructor Documentation

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

Constructor . Use the super constructor

Exceptions:
Exception if super constructor fail

Definition at line 78 of file JResourceMemory.java.


Member Function Documentation

void org.objectweb.jonas.security.realm.factory.JResourceMemory.addGroup String  groupname  )  throws Exception
 

Add a group with a given name

Parameters:
groupname the name of the group
Exceptions:
Exception if the group already exists

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

Definition at line 319 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.factory.JResourceMemory.addGroup().

Here is the call graph for this function:

void org.objectweb.jonas.security.realm.factory.JResourceMemory.addGroup Group  group  )  throws Exception
 

Add a group to this resource.

Parameters:
group the group which need to be added.
Exceptions:
Exception if the group already exists

Definition at line 131 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.factory.JResourceMemory.addRole(), org.objectweb.jonas.security.realm.factory.JResource.getLogger(), and org.objectweb.jonas.security.realm.factory.JResource.getMBeanServer().

Referenced by org.objectweb.jonas.security.realm.factory.JResourceMemory.addGroup(), and org.objectweb.jonas.security.realm.factory.JResourceMemory.addUser().

Here is the call graph for this function:

void org.objectweb.jonas.security.realm.factory.JResourceMemory.addRole String  rolename  )  throws Exception
 

Add a role with a given name

Parameters:
rolename the name of the role
Exceptions:
Exception if the role already exists

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

Definition at line 328 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.factory.JResourceMemory.addRole().

Here is the call graph for this function:

void org.objectweb.jonas.security.realm.factory.JResourceMemory.addRole Role  role  )  throws Exception
 

Add a role to this resource.

Parameters:
role the role which need to be added.
Exceptions:
Exception if the role already exists

Definition at line 165 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.factory.JResource.getLogger(), and org.objectweb.jonas.security.realm.factory.JResource.getMBeanServer().

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

Here is the call graph for this function:

void org.objectweb.jonas.security.realm.factory.JResourceMemory.addUser String  username,
String  password
throws Exception
 

Add a user with a given principal and credential

Parameters:
username the name of the user
password password of the user
Exceptions:
Exception if the user already exists

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

Definition at line 310 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.factory.JResourceMemory.addUser().

Here is the call graph for this function:

void org.objectweb.jonas.security.realm.factory.JResourceMemory.addUser User  user  )  throws Exception
 

Add a user to this resource.

Parameters:
user the user which need to be added.
Exceptions:
Exception if the user already exists

Definition at line 87 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.factory.JResourceMemory.addGroup(), org.objectweb.jonas.security.realm.factory.JResourceMemory.addRole(), org.objectweb.jonas.security.realm.factory.JResource.getLogger(), org.objectweb.jonas.security.realm.factory.JResource.getMBeanServer(), and org.objectweb.jonas.security.realm.factory.JResource.getUsers().

Referenced by org.objectweb.jonas.security.realm.factory.JResourceMemory.addUser().

Here is the call graph for this function:

User org.objectweb.jonas.security.realm.factory.JResourceMemory.findUser String  name  )  throws JResourceException [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

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

Definition at line 190 of file JResourceMemory.java.

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

Here is the call graph for this function:

ArrayList org.objectweb.jonas.security.realm.factory.JResourceMemory.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 248 of file JResourceMemory.java.

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

Here is the call graph for this function:

Hashtable org.objectweb.jonas.security.realm.factory.JResourceMemory.getGroups  ) 
 

Return all the groups

Returns:
the groups

Definition at line 230 of file JResourceMemory.java.

Referenced by org.objectweb.jonas.security.realm.factory.JResourceMemory.toXML().

Reference org.objectweb.jonas.security.realm.factory.JResourceMemory.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 437 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.factory.JResource.getLogger(), org.objectweb.jonas.security.realm.factory.JResource.getName(), and org.objectweb.jonas.security.realm.factory.JResource.getUsers().

Here is the call graph for this function:

Hashtable org.objectweb.jonas.security.realm.factory.JResourceMemory.getRoles  ) 
 

Return all the roles

Returns:
the roles

Definition at line 238 of file JResourceMemory.java.

Referenced by org.objectweb.jonas.security.realm.factory.JResourceMemory.toXML().

boolean org.objectweb.jonas.security.realm.factory.JResourceMemory.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 203 of file JResourceMemory.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:

String [] org.objectweb.jonas.security.realm.factory.JResourceMemory.listGroups  ) 
 

Get the groups

Returns:
the array of the groups

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

Definition at line 484 of file JResourceMemory.java.

String [] org.objectweb.jonas.security.realm.factory.JResourceMemory.listRoles  ) 
 

Get the roles

Returns:
the array of the roles

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

Definition at line 471 of file JResourceMemory.java.

void org.objectweb.jonas.security.realm.factory.JResourceMemory.removeGroup String  groupname  )  throws Exception
 

Remove a group with a given name

Parameters:
groupname the name of the group
Exceptions:
Exception if the group was not found

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

Definition at line 358 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.factory.JResource.getLogger(), and org.objectweb.jonas.security.realm.factory.JResource.getMBeanServer().

Here is the call graph for this function:

void org.objectweb.jonas.security.realm.factory.JResourceMemory.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 497 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.factory.JResource.getLogger(), org.objectweb.jonas.security.realm.factory.JResource.getMBeanServer(), org.objectweb.jonas.security.realm.principals.Group.getName(), org.objectweb.jonas.security.realm.principals.Role.getName(), org.objectweb.jonas.security.realm.principals.User.getName(), and org.objectweb.jonas.security.realm.factory.JResource.getUsers().

Here is the call graph for this function:

void org.objectweb.jonas.security.realm.factory.JResourceMemory.removeRole String  rolename  )  throws Exception
 

Remove a role with a given name

Parameters:
rolename the name of the role
Exceptions:
Exception if the role was not found

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

Definition at line 378 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.factory.JResource.getLogger(), and org.objectweb.jonas.security.realm.factory.JResource.getMBeanServer().

Here is the call graph for this function:

void org.objectweb.jonas.security.realm.factory.JResourceMemory.removeUser String  username  )  throws Exception
 

Remove a user with a given principal

Parameters:
username the name of the user
Exceptions:
Exception if the user was not found

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

Definition at line 337 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.factory.JResource.getLogger(), org.objectweb.jonas.security.realm.factory.JResource.getMBeanServer(), and org.objectweb.jonas.security.realm.factory.JResource.getUsers().

Here is the call graph for this function:

void org.objectweb.jonas.security.realm.factory.JResourceMemory.setGroups Hashtable  groups  ) 
 

Set the groups

Parameters:
groups the groups of this resource

Definition at line 292 of file JResourceMemory.java.

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

void org.objectweb.jonas.security.realm.factory.JResourceMemory.setRoles Hashtable  roles  ) 
 

Set the roles

Parameters:
roles the roles of this resource

Definition at line 300 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.principals.Group.roles.

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

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

The string representation of this realm is the XML

Returns:
XML representation

Definition at line 425 of file JResourceMemory.java.

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

Here is the call graph for this function:

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

String representation of the MemoryRealm

Returns:
the xml representation of the MemoryRealm

Definition at line 397 of file JResourceMemory.java.

References org.objectweb.jonas.security.realm.factory.JResourceMemory.getGroups(), org.objectweb.jonas.security.realm.factory.JResource.getName(), org.objectweb.jonas.security.realm.factory.JResourceMemory.getRoles(), org.objectweb.jonas.security.realm.factory.JResource.getUsers(), and org.objectweb.jonas.security.realm.principals.Group.toString().

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

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:54 2005 for JOnAS by  doxygen 1.3.9.1