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.webapp.example
Interface User

All Known Implementing Classes:
  MemoryUser

    public interface User

A User which is stored, along with his or her associated `Subscription`s, in a `UserDatabase`.

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

Method Summary
`Subscription` | `createSubscription(String host)` Create and return a new `Subscription` associated with this User, for the specified host name.
`Subscription` | `findSubscription(String host)` Find and return the `Subscription` associated with the specified host.
`UserDatabase` | `getDatabase()` Return the `UserDatabase` with which we are associated.
`String` | `getFromAddress()` Return the from address.
`String` | `getFullName()` Return the full name.
`String` | `getPassword()` Return the password.
`String` | `getReplyToAddress()` Return the reply-to address.
`Subscription[]` | `getSubscriptions()` Find and return all `Subscription`s associated with this user.
`String` | `getUsername()` Return the username.
`void` | `removeSubscription(Subscription subscription)` Remove the specified `Subscription` from being associated with this User.
`void` | `setFromAddress(String fromAddress)` Set the from address.
`void` | `setFullName(String fullName)` Set the full name.
`void` | `setPassword(String password)` Set the password.
`void` | `setReplyToAddress(String replyToAddress)` Set the reply-to address.

Method Detail

### getDatabase

    UserDatabase getDatabase()

  Return the `UserDatabase` with which we are associated.

### getFromAddress

    String getFromAddress()

  Return the from address.

### setFromAddress

    void setFromAddress(String fromAddress)

  Set the from address.

  Parameters:
    `fromAddress` - The new from address

### getFullName

    String getFullName()

  Return the full name.

### setFullName

    void setFullName(String fullName)

  Set the full name.

  Parameters:
    `fullName` - The new full name

### getPassword

    String getPassword()

  Return the password.

### setPassword

    void setPassword(String password)

  Set the password.

  Parameters:
    `password` - The new password

### getReplyToAddress

    String getReplyToAddress()

  Return the reply-to address.

### setReplyToAddress

    void setReplyToAddress(String replyToAddress)

  Set the reply-to address.

  Parameters:
    `replyToAddress` - The new reply-to address

### getSubscriptions

    Subscription[] getSubscriptions()

  Find and return all `Subscription`s associated with this user. If there are none, a zero-length array is returned.

### getUsername

    String getUsername()

  Return the username.

### createSubscription

    Subscription createSubscription(String host)

  Create and return a new `Subscription` associated with this User, for the specified host name.

  Parameters:
    `host` - Host name for which to create a subscription
  Throws:
    `IllegalArgumentException` - if the host name is not unique for this user

### findSubscription

    Subscription findSubscription(String host)

  Find and return the `Subscription` associated with the specified host. If none is found, return `null`.

  Parameters:
    `host` - Host name to look up

### removeSubscription

    void removeSubscription(Subscription subscription)

  Remove the specified `Subscription` from being associated with this User.

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

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.