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.apache.struts.apps.mailreader.dao
Interface UserDatabase

All Known Implementing Classes:
  MemoryUserDatabase

    public interface UserDatabase

A Data Access Object (DAO) interface describing the available operations for retrieving and storing `User`s (and their associated `Subscription`s) in some persistence layer whose characteristics are not specified here. One or more implementations will be created to perform the actual I/O that is required.

Since:
  Struts 1.1
Version:
  $Rev: 471754 $ $Date: 2006-11-06 08:55:09 -0600 (Mon, 06 Nov 2006) $

Method Summary
`void` | `close()` Finalize access to the underlying persistence layer.
`User` | `createUser(String username)` Create and return a new `User` defined in this user database.
`User` | `findUser(String username)` Return the existing `User` with the specified username, if any; otherwise return `null`.
`User[]` | `findUsers()` Return the set of `User`s defined in this user database.
`boolean` | `isOpen()` Return true if open() has been called.
`void` | `open()` Initiate access to the underlying persistence layer.
`void` | `removeUser(User user)` Remove the specified `User` from this database.
`void` | `save()` Save any pending changes to the underlying persistence layer.

Method Detail

### createUser

    User createUser(String username)

  Create and return a new `User` defined in this user database.

  Parameters:
    `username` - Username of the new user
  Throws:
    `IllegalArgumentException` - if the specified username is not unique

### close

    void close()
               throws Exception

  Finalize access to the underlying persistence layer.

  Throws:
    `Exception` - if a database access error occurs

### findUser

    User findUser(String username)
                  throws ExpiredPasswordException

  Return the existing `User` with the specified username, if any; otherwise return `null`.

  Parameters:
    `username` - Username of the user to retrieve
  Throws:
    `ExpiredPasswordException` - if user password has expired and must be changed

### findUsers

    User[] findUsers()

  Return the set of `User`s defined in this user database.

### isOpen

    boolean isOpen()

  Return true if open() has been called.

  Throws:
    `Exception` - if a database access error occurs

### open

    void open()
              throws Exception

  Initiate access to the underlying persistence layer.

  Throws:
    `Exception` - if a database access error occurs

### removeUser

    void removeUser(User user)

  Remove the specified `User` from this database.

  Parameters:
    `user` - User to be removed
  Throws:
    `IllegalArgumentException` - if the specified user is not associated with this database

### save

    void save()
              throws Exception

  Save any pending changes to the underlying persistence layer.

  Throws:
    `Exception` - if a database access error occurs

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 © 2000-2008 Apache Software Foundation. All Rights Reserved.