Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.acegisecurity.userdetails.memory
Class InMemoryDaoImpl  view InMemoryDaoImpl download InMemoryDaoImpl.java

java.lang.Object
  extended byorg.acegisecurity.userdetails.memory.InMemoryDaoImpl
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.acegisecurity.userdetails.UserDetailsService

public class InMemoryDaoImpl
extends java.lang.Object
implements org.acegisecurity.userdetails.UserDetailsService, org.springframework.beans.factory.InitializingBean

Retrieves user details from an in-memory list created by the bean context.

Version:
$Id: InMemoryDaoImpl.java,v 1.9 2005/11/29 13:10:09 benalex Exp $

Field Summary
private  UserMap userMap
           
 
Constructor Summary
InMemoryDaoImpl()
           
 
Method Summary
 void afterPropertiesSet()
          Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).
 UserMap getUserMap()
           
 org.acegisecurity.userdetails.UserDetails loadUserByUsername(java.lang.String username)
          Locates the user based on the username.
 void setUserMap(UserMap userMap)
           
 void setUserProperties(java.util.Properties props)
          Modifies the internal UserMap to reflect the Properties instance passed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userMap

private UserMap userMap
Constructor Detail

InMemoryDaoImpl

public InMemoryDaoImpl()
Method Detail

setUserMap

public void setUserMap(UserMap userMap)

getUserMap

public UserMap getUserMap()

setUserProperties

public void setUserProperties(java.util.Properties props)
Modifies the internal UserMap to reflect the Properties instance passed. This helps externalise user information to another file etc.


afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Description copied from interface: org.springframework.beans.factory.InitializingBean
Invoked by a BeanFactory after it has set all bean properties supplied (and satisfied BeanFactoryAware and ApplicationContextAware).

This method allows the bean instance to perform initialization only possible when all bean properties have been set and to throw an exception in the event of misconfiguration.

Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean

loadUserByUsername

public org.acegisecurity.userdetails.UserDetails loadUserByUsername(java.lang.String username)
                                                             throws org.acegisecurity.userdetails.UsernameNotFoundException,
                                                                    org.springframework.dao.DataAccessException
Description copied from interface: org.acegisecurity.userdetails.UserDetailsService
Locates the user based on the username. In the actual implementation, the search may possibly be case insensitive, or case insensitive depending on how the implementaion instance is configured. In this case, the UserDetails object that comes back may have a username that is of a different case than what was actually requested..

Specified by:
loadUserByUsername in interface org.acegisecurity.userdetails.UserDetailsService