Holger's Java API

## com.antelmann.db
Class DefaultUserLoginStore

    java.lang.Object
      com.antelmann.db.AbstractUserLoginStore
          com.antelmann.db.DefaultUserLoginStore

All Implemented Interfaces:
  UserLoginStore

    public class DefaultUserLoginStore

extends AbstractUserLoginStore

a simple transient implementation of a UserLoginStore. As this implementation is purely transient, no DatabaseExceptions are ever thrown.

Since:
  15. November 2006, 23:09
Author:
  Holger Antelmann

Constructor Summary
`DefaultUserLoginStore(User... users)`

Method Summary
`boolean` `addUser(User user)` adds a user to this store, so that it can be used for login.
`User[]` `getAllUsers()` returns all users available in this store
`User` `getUserForName(String name)` returns the User associated with the given name or null if no such user exists
`Iterable<String>` `getUserNames()` returns a list of valid user names (never null)
`boolean` `removeUser(User user)`

Methods inherited from class com.antelmann.db.AbstractUserLoginStore
`addLoginListener, getActiveUsers, getBackDoorUser, getCurrentUser, getLoginListeners, getLoginTime, isActiveUser, listUsers, listUsers, loginCanceled, loginUser, loginUser, logoutAll, logoutUser, removeLoginListener, setBackDoorUser`

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

Constructor Detail

### DefaultUserLoginStore

    public DefaultUserLoginStore(User... users)

Method Detail

### addUser

    public boolean addUser(User user)

  adds a user to this store, so that it can be used for login. Users are mapped by their case-insensitive name, i.e. it is assumed that all user names are unique, just as their IDs.

### removeUser

    public boolean removeUser(User user)

### getAllUsers

    public User[] getAllUsers()

  returns all users available in this store

### getUserForName

    public User getUserForName(String name)
                        throws DatabaseException

  Description copied from interface: `UserLoginStore`
  returns the User associated with the given name or null if no such user exists

  Throws:
    `DatabaseException`

### getUserNames

    public Iterable<String> getUserNames()

  Description copied from interface: `UserLoginStore`
  returns a list of valid user names (never null)

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads