Stefano Bagnara schrieb:

Did you plan to obtain a real javamail folder when you lookup the MailStore or an object implementing a James interface very similar to the Javamail folder ?

The MailStore has to implement the FolderAware interface which offers a
getFolder() method which returns a real Javamail folder.

Ok, so I think we should start making this more James-ish.

Of course that is not James-ish. It's an interim solution.

I'll try to define a new James interface (MessageFolder or MessageRepository) based on a subinterface of the Javamail Folder interface. I'll start putting there all the commands we really use from the Javamail folder.

And there you touched another big design deficiency of Javamail. There isn't a Folder interface! That could really be a knock out against Javamail because we would be very limited in inheritance. So I'm really not sure about that. At the moment I propagate Javamail because it's actually there and has a working implementation that fit's all needs of imap. The imap2 proposal already has own interfaces for ImapStore and ImapMailbox (Folder). ImapMailbox is similar to Folder from Javamail. I've created JavaMailImapStore and JavaMailImapMailbox which aren't much more than wrapper classes. So the Javamail approach is enough capsulated. However the final store will look like. It's like a prototype we can learn from in the future.

This is a first step: I'll try to do this in the trunk in the next weeks, then we'll move to the next issue. The new interface will be experimental, but we discussed about this repository change for years, we should put something in, and then we'll refactor/tune it in future!

I'm pro starting a discussion about the backend. And it is always better to have some experimental code than just talk about it. But I don't think we should start implementing an own imap compatible store or making irreversible design decisions at this time. It is hard to foresee all the requirements without understanding the whole thing. On the other hand i don't want to slow down. I actually love Java because of refactoring.

Joachim

PS: sorry for that duplicate mails

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to