Stefano Bagnara wrote:
FolderAware: why does a mailRepository implements a FolderAware
interface that returns a Folder that is then incapsulated in a
JavaMailImapMailbox ? Can't we change the FolderAware to directly
return an ImapMailbox so we don't have direct access to the
underlying Javamail Folder interface at this level?
That is only an interim solution to allow access from the James side
and from the imap server side until we are sure how to design the new
MailStore. Then ImapMailbox and ImapStore interfaces will be obsolete
and James MailStore could be used directly.
Can you reply to the question itself? I understand your points but the
answer to the question will help me better understand if I learned
enough of that part ;-)
JamesImapStore could take place of JavaMailImapStore which looks up the
MailRepository for the corresponding user and calls getImapMailbox() or
maybe getImapMailbox(String folderName) on it.
getUidValidity, getUidNext, getMsn: what are intended for?
uidValidity is a (random or current time?) number that is generated
when the store is created. The first message stored get's the uid 1
the next 2. If the store is created again from scratch (maybe because
of a system crash) that uidvalidity changes and the client knows that
he can't depend on the now outdated uids. getUidNext is the uid the
next new message will get.
getMsn translates Uid to message number
Currently repositories do not have a persistent place to remember this
thing, but maybe we simply have to create an hash of the repository
configuration so it changes only when the repository configuration is
change. We probably don't need to make it to change in different
circumstances.
uidValidity has to change when the last assigned uid is not known
anymore. When you don't have an old value of uid you can increment you
set uid=1 again and chang uidValidiry so everybody knows that has happened.
Joachim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]