Dashboard > Struts University > Home > MailReader > MailReader Object Model
MailReader Object Model
Added by Ted Husted, last edited by Ted Husted on Jul 28, 2006  (view change)
Labels: 
(None)


+ = Public - = Private * = Constructor

Associations

  • UserDatabase owns User (0+)
  • User owns Subscription (0+)

Subscription: interface

An account with an email server or service.

Attributes

+ AutoConnect: Boolean
+ Host: String (readonly)
+ Type: String
+ Username: String
+ Password: String
+ User: User (readonly)

Behaviors

  • isOpen: Boolean

User: interface

An authenticated client with zero or more Subscriptions.

Attributes

+ Username: String (readonly)
+ Password: String
+ FullName: String
+ FromAddress: String
+ ReplyToAddress: String
+ DataBase: UserDatabase
+ Subscription: Subscription[]

Behaviors

+ CreateSubscription(Host:String): Subscription
+ FindSubscription(Host:String):Subscription
+ RemoveSubscription(Subscription:Subcription)

UserDatabase: interface

A collection of Users and related Subscriptions.

Behaviors

+ Open()
+ Save()
+ Close()
+ CreateUser(username:String): User
+ FindUser(username:String): User
+ FindUsers(): User[]
+ RemoveUser(user:User)
+ UpdateUser(User) !NEW!

MemorySubscription: Subscription

A simple implementation of Subscription that can be used with a MemoryDatabase.

Attributes

- autoConnect:Boolean
- host:String
- type:String
- username:String
- password
- user:User

Behaviors

* MemorySubscription()
+ MemorySubscription(user:MemoryUser host:String)
+ ToString:String

MemoryUser: User

A simple implementation of User that can be used with a MemoryDatase.

Attributes

- username:String
- password:String
- fullname:String
- fromAddress:String
- replyToAddress:String
- database:MemoryDataBAse
- subscriptions:HashMap

Behaviors

  • MemoryUser (database:MemoryUserDatabase: username:String)
    + ToString:String

MemoryUserDatabase: UserDatabase

An implementation of UserDatabase that stores users in main system memory. Usually persisted through a XML document.

Attributes

- log:Log
- users:HashMap
- pathnameOld:String
- pathnameNew:String
+ pathname:String

Behaviors

* MemoryUserDatabase()

PlugIn: interface

An adapter used to load extensions to a Struts 1 application.

Behaviors

+ Init(servlet:ActionServlet servlet config:ModuleConfig)
+ Destroy()

MemoryDataBasePlugIn: PlugIn

A PlugIn that persists a MemoryUserDatabase via a XML document.

Attributes

- database:MemoryUserDatabase
- log:Log
- servlet:ActionServlet
+ Pathname

Behaviors

  • :PlugIn
    - CalculatePath()

ObjectCreationFactory: interface

A factory for creating objects using the Commons Digester.

Behaviors

+ Digester:Digester
+ createObject(attributes:Attributes):Object

MemorySubscriptionCreationFactory: ObjectCreationFactory

An ObjectCreationFactory that creates Subscriptions.

Attributes

+ Digester:Digester

Behaviors

* MemorySubscriptionCreationFactory()

MemoryUserCreationFactory: ObjectCreationFactory

An ObjectCreationFactory that creates Users.

Attributes

+ Digester:Digester

Behaviors

* MemoryUserCreationFactory()
+ MemoryUserCreationFactory(database:MemoryUserDatabase)


Site running on a free Atlassian Confluence Open Source Project License granted to OSS. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.5 Build:#811 Jul 25, 2007) - Bug/feature request - Contact Administrators