FileDocCategorySizeDatePackage
MailRepository.javaAPI DocApache James 2.3.13675Fri Jan 12 12:56:26 GMT 2007org.apache.james.services

MailRepository

public interface MailRepository
Interface for a Repository to store Mails.
version
1.0.0, 24/04/1999

Fields Summary
String
ROLE
The component role used by components implementing this service
String
MAIL
Define a MAIL repository. MAILS are stored in the specified destination.
Constructors Summary
Methods Summary
public java.util.Iteratorlist()
List string keys of messages in repository.

return
an Iterator over the list of keys in the repository

public booleanlock(java.lang.String key)
Obtains a lock on a message identified by key

param
key the key of the message to be locked
return
true if successfully obtained the lock, false otherwise

public voidremove(org.apache.mailet.Mail mail)
Removes a specified message

param
mail the message to be removed from the repository

public voidremove(java.util.Collection mails)
Remove an Collection of mails from the repository

param
mails The Collection of MailImpl's to delete
since
2.2.0

public voidremove(java.lang.String key)
Removes a message identified by key.

param
key the key of the message to be removed from the repository

public org.apache.mailet.Mailretrieve(java.lang.String key)
Retrieves a message given a key. At the moment, keys can be obtained from list() in superinterface Store.Repository

param
key the key of the message to retrieve
return
the mail corresponding to this key, null if none exists

public voidstore(org.apache.mailet.Mail mc)
Stores a message in this repository. Shouldn't this return the key under which it is stored?

param
mc the mail message to store

public booleanunlock(java.lang.String key)
Releases a lock on a message identified the key

param
key the key of the message to be unlocked
return
true if successfully released the lock, false otherwise