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

All Known Implementing Classes:
AbstractJResource, JResourceDS, JResourceLDAP, JResourceMemory

public interface JResource

This interface represents JOnAS realm factory objects.

Author:
Guillaume Sauthier

Method Summary
 void clearCache()
          Clear the cache
 JUser findUser(String name)
          Check if a user is found and return it
 ArrayList getArrayListCombinedRoles(JUser user)
          Get all the roles (from the roles and from the groups) of the given user
 String getName()
          Get the name of this resource
 Reference getReference()
          Retrieves the Reference of the object.
 Hashtable getUsers()
          Return users
 boolean isValidUser(JUser user, String credentials)
          Check if the given credential is the right credential for the given user
 void removeMBeans()
          Remove all the Mbeans used by this resource
 void setName(String name)
          Set the name of this resource
 void setUsers(Hashtable users)
           
 

Method Detail

setName

void setName(String name)
Set the name of this resource

Parameters:
name - Name of the resource

getName

String getName()
Get the name of this resource

Returns:
the name of this resource

getReference

Reference getReference()
                       throws NamingException
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.
Throws:
NamingException - if a naming exception was encountered while retrieving the reference.

removeMBeans

void removeMBeans()
                  throws JResourceException
Remove all the Mbeans used by this resource

Throws:
JResourceException - if the MBeans can not be removed

findUser

JUser findUser(String name)
               throws JResourceException
Check if a user is found and return it

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

isValidUser

boolean isValidUser(JUser user,
                    String credentials)
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

getArrayListCombinedRoles

ArrayList getArrayListCombinedRoles(JUser user)
                                    throws JResourceException
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
Throws:
JResourceException - if it fails

getUsers

Hashtable getUsers()
Return users

Returns:
Return users

setUsers

void setUsers(Hashtable users)
Parameters:
users - The users to set.

clearCache

void clearCache()
Clear the cache



Copyright © 2007 OW2 Consortium. All Rights Reserved.