|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.james.mailboxmanager.torque.TorqueMailboxManager
public class TorqueMailboxManager
| Field Summary | |
|---|---|
protected org.apache.commons.logging.Log |
log
|
| Fields inherited from interface org.apache.james.mailboxmanager.manager.MailboxManager |
|---|
HIERARCHY_DELIMITER, INBOX, USER_NAMESPACE |
| Constructor Summary | |
|---|---|
TorqueMailboxManager(UserManager userManager)
|
|
| Method Summary | |
|---|---|
void |
copyMessages(MessageRange set,
java.lang.String from,
java.lang.String to,
MailboxSession session)
this is done by the MailboxRepository because maybe this operation could be optimized in the corresponding store. |
void |
createMailbox(java.lang.String namespaceName)
Creates a new mailbox. |
MailboxSession |
createSession()
Creates a new session. |
void |
deleteEverything()
|
void |
deleteMailbox(java.lang.String mailboxName,
MailboxSession session)
|
boolean |
existsMailbox(java.lang.String mailboxName)
|
protected org.apache.commons.logging.Log |
getLog()
|
Mailbox |
getMailbox(java.lang.String mailboxName,
boolean autoCreate)
Gets an session suitable for IMAP. |
boolean |
isAuthentic(java.lang.String userid,
java.lang.String passwd)
Autenticates the given user against the given password. |
ListResult[] |
list(MailboxExpression mailboxExpression)
TODO: Expression requires parsing. |
void |
renameMailbox(java.lang.String from,
java.lang.String to)
Renames a mailbox. |
java.lang.String |
resolve(java.lang.String userName,
java.lang.String mailboxPath)
Resolves a path for the given user. |
void |
setSubscription(java.lang.String mailboxName,
boolean value)
|
void |
subscribe(java.lang.String user,
java.lang.String mailbox)
Subscribes the user to the given mailbox. |
java.util.Collection |
subscriptions(java.lang.String user)
Lists current subscriptions for the given user. |
void |
unsubscribe(java.lang.String user,
java.lang.String mailbox)
Unsubscribes the user from the given mailbox. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public TorqueMailboxManager(UserManager userManager)
| Method Detail |
|---|
public Mailbox getMailbox(java.lang.String mailboxName,
boolean autoCreate)
throws MailboxManagerException
MailboxManager
getMailbox in interface MailboxManagermailboxName - the name of the mailbox, not nullautoCreate - create this mailbox if it doesn't exist
ImapMailboxSession, not null
MailboxManagerException - when the mailbox cannot be opened
MailboxNotFoundException - when the given mailbox does not exist
public void createMailbox(java.lang.String namespaceName)
throws MailboxManagerException
MailboxManager
createMailbox in interface MailboxManagernamespaceName - name, not null
MailboxManagerException
public void deleteMailbox(java.lang.String mailboxName,
MailboxSession session)
throws MailboxManagerException
deleteMailbox in interface MailboxManagerMailboxManagerException
public void renameMailbox(java.lang.String from,
java.lang.String to)
throws MailboxManagerException
MailboxManager
renameMailbox in interface MailboxManagerfrom - original name for the mailboxto - new name for the mailbox
MailboxManagerException
MailboxExistsException - when the to mailbox exists
public void copyMessages(MessageRange set,
java.lang.String from,
java.lang.String to,
MailboxSession session)
throws MailboxManagerException
MailboxManager
copyMessages in interface MailboxManagerset - messages to copyfrom - name of the source mailboxto - name of the destination mailboxsession - MailboxSession, not null
MailboxManagerException
public ListResult[] list(MailboxExpression mailboxExpression)
throws MailboxManagerException
MailboxManager
list in interface MailboxManagermailboxExpression - MailboxExpression used to select mailboxes to
be returned
MailboxManagerException
public void setSubscription(java.lang.String mailboxName,
boolean value)
public boolean existsMailbox(java.lang.String mailboxName)
throws MailboxManagerException
existsMailbox in interface MailboxManagerMailboxManagerException
public void deleteEverything()
throws MailboxManagerException
MailboxManagerExceptionprotected org.apache.commons.logging.Log getLog()
public MailboxSession createSession()
MailboxManager
createSession in interface MailboxManagerMailboxSession, not null
public java.lang.String resolve(java.lang.String userName,
java.lang.String mailboxPath)
MailboxManagerResolves a path for the given user.
TODO: Think about replacing this operation TODO: More elegant to pass in the username TODO: Or switch to URLs
resolve in interface MailboxManager
public boolean isAuthentic(java.lang.String userid,
java.lang.String passwd)
MailboxManager
isAuthentic in interface MailboxManageruserid - user namepasswd - password supplied
public void subscribe(java.lang.String user,
java.lang.String mailbox)
throws SubscriptionException
MailboxManager
subscribe in interface MailboxManageruser - the user name, not nullmailbox - the mailbox name, not null
SubscriptionException
public java.util.Collection subscriptions(java.lang.String user)
throws SubscriptionException
MailboxManager
subscriptions in interface MailboxManageruser - the user name, not null
Collection of mailbox names
SubscriptionException
public void unsubscribe(java.lang.String user,
java.lang.String mailbox)
throws SubscriptionException
MailboxManager
unsubscribe in interface MailboxManageruser - the user name, not nullmailbox - the mailbox name, not null
SubscriptionException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||