org.apache.struts.apps.mailreader.dao
Interface User

All Known Implementing Classes:
AbstractUser, MemoryUser

public interface User

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

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

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 Subscriptions 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

UserDatabase getDatabase()
Return the UserDatabase with which we are associated.


getFromAddress

java.lang.String getFromAddress()
Return the from address.


setFromAddress

void setFromAddress(java.lang.String fromAddress)
Set the from address.

Parameters:
fromAddress - The new from address

getFullName

java.lang.String getFullName()
Return the full name.


setFullName

void setFullName(java.lang.String fullName)
Set the full name.

Parameters:
fullName - The new full name

getPassword

java.lang.String getPassword()
Return the password.


setPassword

void setPassword(java.lang.String password)
Set the password.

Parameters:
password - The new password

getReplyToAddress

java.lang.String getReplyToAddress()
Return the reply-to address.


setReplyToAddress

void setReplyToAddress(java.lang.String replyToAddress)
Set the reply-to address.

Parameters:
replyToAddress - The new reply-to address

getSubscriptions

Subscription[] getSubscriptions()
Find and return all Subscriptions associated with this user. If there are none, a zero-length array is returned.


getUsername

java.lang.String getUsername()
Return the username.


createSubscription

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

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

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


Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.