|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.apps.mailreader.dao.impl.AbstractUser
public abstract class AbstractUser
Concrete implementation of AbstractUser
.
Constructor Summary | |
---|---|
AbstractUser(UserDatabase database,
String username)
Construct a new User associated with the specified UserDatabase . |
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()
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()
The username (must be unique). |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractUser(UserDatabase database, String username)
Construct a new User associated with the specified
UserDatabase
.
database
- The user database with which we are associatedusername
- The username of this userMethod Detail |
---|
public UserDatabase getDatabase()
UserDatabase
with which we are associated.
getDatabase
in interface User
public String getFromAddress()
User
getFromAddress
in interface User
public void setFromAddress(String fromAddress)
User
setFromAddress
in interface User
fromAddress
- The new from addresspublic String getFullName()
User
getFullName
in interface User
public void setFullName(String fullName)
User
setFullName
in interface User
fullName
- The new full namepublic String getPassword()
User
getPassword
in interface User
public void setPassword(String password)
User
setPassword
in interface User
password
- The new passwordpublic String getReplyToAddress()
User
getReplyToAddress
in interface User
public void setReplyToAddress(String replyToAddress)
User
setReplyToAddress
in interface User
replyToAddress
- The new reply-to addresspublic Subscription[] getSubscriptions()
Subscription
s associated with this user.
If there are none, a zero-length array is returned.
getSubscriptions
in interface User
public String getUsername()
getUsername
in interface User
public Subscription createSubscription(String host)
Subscription
associated with this
User, for the specified host name.
createSubscription
in interface User
host
- Host name for which to create a subscription
IllegalArgumentException
- if the host name is not unique
for this userpublic Subscription findSubscription(String host)
Subscription
associated with the specified
host. If none is found, return null
.
findSubscription
in interface User
host
- Host name to look uppublic void removeSubscription(Subscription subscription)
Subscription
from being associated
with this User.
removeSubscription
in interface User
subscription
- Subscription to be removed
IllegalArgumentException
- if the specified subscription is not
associated with this User
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |