james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin.Bergljung" <Martin.Berglj...@opsera.com>
Subject RE: [jira] Created: (IMAP-71) Design: Consolidate Sessions
Date Wed, 18 Mar 2009 12:37:16 GMT
Some more design stuff:

It should be possible to i18n error messages from any method in the API.

For example, if I today try to create a mailbox which already exist, I get the following message
displayed in the
Email client:

"Cannot create the folder. The server responded: 'CREATE processing failed'"

It does not tell me what is wrong and it gives me unimportant information.

The message should be generated with similar technique to what is available for subscribe():

   throw new SubscriptionException(HumanReadableTextKey.GENERIC_SUBSCRIPTION_FAILURE);

So for mailbox exist exception I would like to throw:

   throw new MailboxException(MyTextKey.MAILBOX_EXIST_CANNOT_CREATE);

and then i18n properties files to resolve:

mytexts.mailbox.exist.cannot.create=A mailbox with this name already exist, cannot create


-----Original Message-----
From: Robert Burrell Donkin (JIRA) [mailto:server-dev@james.apache.org] 
Sent: den 18 mars 2009 09:56
To: server-dev@james.apache.org
Subject: [jira] Created: (IMAP-71) Design: Consolidate Sessions

Design: Consolidate Sessions

                 Key: IMAP-71
                 URL: https://issues.apache.org/jira/browse/IMAP-71
             Project: JAMES Imap
          Issue Type: Improvement
          Components: Mailbox, Protocol
    Affects Versions: 0.1
            Reporter: Robert Burrell Donkin
             Fix For: 0.1

ATM two sessions are used - an ImapSession for the IMAP protocol layers, and a MailboxSession
for the mailbox layers. This is probably a mistake. The API would be easier to extend if protocol
and mailbox used the same session. 

Unfortunately, ImapSession is coupled to a number of quite IMAP specific classes. Improvements
to the design in this area (eg. simplification of the inefficient notification system) would
probably allows this to be refactored but for the moment, seems better to push methods up
into MailboxSession, and MailboxSession up into the API. ImapSession could then extend MailboxSession.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message