|
||||||||||
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 MailboxManager
mailboxName
- 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 existpublic void createMailbox(java.lang.String namespaceName) throws MailboxManagerException
MailboxManager
createMailbox
in interface MailboxManager
namespaceName
- name, not null
MailboxManagerException
public void deleteMailbox(java.lang.String mailboxName, MailboxSession session) throws MailboxManagerException
deleteMailbox
in interface MailboxManager
MailboxManagerException
public void renameMailbox(java.lang.String from, java.lang.String to) throws MailboxManagerException
MailboxManager
renameMailbox
in interface MailboxManager
from
- original name for the mailboxto
- new name for the mailbox
MailboxManagerException
MailboxExistsException
- when the to
mailbox existspublic void copyMessages(MessageRange set, java.lang.String from, java.lang.String to, MailboxSession session) throws MailboxManagerException
MailboxManager
copyMessages
in interface MailboxManager
set
- 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 MailboxManager
mailboxExpression
- 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 MailboxManager
MailboxManagerException
public void deleteEverything() throws MailboxManagerException
MailboxManagerException
protected org.apache.commons.logging.Log getLog()
public MailboxSession createSession()
MailboxManager
createSession
in interface MailboxManager
MailboxSession
, not nullpublic java.lang.String resolve(java.lang.String userName, java.lang.String mailboxPath)
MailboxManager
Resolves 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 MailboxManager
userid
- user namepasswd
- password supplied
public void subscribe(java.lang.String user, java.lang.String mailbox) throws SubscriptionException
MailboxManager
subscribe
in interface MailboxManager
user
- 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 MailboxManager
user
- 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 MailboxManager
user
- 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 |