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

## org.apache.struts.examples.mailreader
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: 54929 $ $Date: 2004-10-16 09:38:42 -0700 (Sat, 16 Oct 2004) $

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

Method Detail

### getDatabase

    public UserDatabase getDatabase()

  Return the `UserDatabase` with which we are associated.

### getFromAddress

    public java.lang.String getFromAddress()

  Return the from address.

### setFromAddress

    public void setFromAddress(java.lang.String fromAddress)

  Set the from address.
  Parameters:
    `fromAddress` - The new from address

### getFullName

    public java.lang.String getFullName()

  Return the full name.

### setFullName

    public void setFullName(java.lang.String fullName)

  Set the full name.
  Parameters:
    `fullName` - The new full name

### getPassword

    public java.lang.String getPassword()

  Return the password.

### setPassword

    public void setPassword(java.lang.String password)

  Set the password.
  Parameters:
    `password` - The new password

### getReplyToAddress

    public java.lang.String getReplyToAddress()

  Return the reply-to address.

### setReplyToAddress

    public void setReplyToAddress(java.lang.String replyToAddress)

  Set the reply-to address.
  Parameters:
    `replyToAddress` - The new reply-to address

### getSubscriptions

    public Subscription[] getSubscriptions()

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

### getUsername

    public java.lang.String getUsername()

  Return the username.

### createSubscription

    public Subscription createSubscription(java.lang.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:
    `java.lang.IllegalArgumentException` - if the host name is not unique for this user

### findSubscription

    public Subscription findSubscription(java.lang.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

    public void removeSubscription(Subscription subscription)

  Remove the specified `Subscription` from being associated with this User.
  Parameters:
    `subscription` - Subscription to be removed
  Throws:
    `java.lang.IllegalArgumentException` - if the specified subscription is not associated with this User

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

Copyright © 2003-2004 - The Apache Software Foundation