Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.acegisecurity.userdetails.memory
Class UserMap

    java.lang.Object
      org.acegisecurity.userdetails.memory.UserMap

    public class UserMap

extends Object

Used by `InMemoryDaoImpl` to store a list of users and their corresponding granted authorities.

Version:
  $Id: UserMap.java,v 1.8 2005/11/29 13:10:09 benalex Exp $
Author:
  Ben Alex

Constructor Summary
`UserMap()`

Method Summary
`void` | `addUser(UserDetails user)` Adds a user to the in-memory map.
`User` | `getUser(String username)` Locates the specified user by performing a case insensitive search by username.
`int` | `getUserCount()` Indicates the size of the user map.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### UserMap

    public UserMap()

Method Detail

### getUser

    public User getUser(String username)
                 throws UsernameNotFoundException

  Locates the specified user by performing a case insensitive search by username.

  Parameters:
    `username` - to find
  Returns:
    the located user
  Throws:
    `UsernameNotFoundException` - if the user could not be found

### getUserCount

    public int getUserCount()

  Indicates the size of the user map.

  Returns:
    the number of users in the map

### addUser

    public void addUser(UserDetails user)
                 throws IllegalArgumentException

  Adds a user to the in-memory map.

  Parameters:
    `user` - the user to be stored
  Throws:
    `IllegalArgumentException` - if a null User was passed

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.