Nuxeo Enterprise Platform 5.4

org.nuxeo.cm.core.service
Class MailboxManagementServiceImpl

java.lang.Object
  extended by org.nuxeo.cm.core.service.MailboxManagementServiceImpl
All Implemented Interfaces:
Serializable, MailboxManagementService

public class MailboxManagementServiceImpl
extends Object
implements MailboxManagementService

Correspondence service core implementation

See Also:
Serialized Form

Constructor Summary
MailboxManagementServiceImpl()
           
 
Method Summary
 List<Mailbox> createPersonalMailboxes(org.nuxeo.ecm.core.api.CoreSession session, String user)
          Create the personal Mailbox with the registered
 Mailbox getMailbox(org.nuxeo.ecm.core.api.CoreSession session, String muid)
          Returns the mailbox with given unique identifier.
 List<Mailbox> getMailboxes(org.nuxeo.ecm.core.api.CoreSession session, List<String> muids)
          Returns the mailboxes with given unique identifiers.
 List<MailboxHeader> getMailboxesHeaders(org.nuxeo.ecm.core.api.CoreSession session, List<String> muids)
          Returns the mailboxes with given unique identifiers and a session.
 MailboxHeader getMailboxHeader(org.nuxeo.ecm.core.api.CoreSession session, String muid)
           
 List<Mailbox> getUserMailboxes(org.nuxeo.ecm.core.api.CoreSession session, String user)
          Returns all mailboxes for given user.
 Mailbox getUserPersonalMailbox(org.nuxeo.ecm.core.api.CoreSession session, String user)
          Returns the personal mailbox of the given user.
 Mailbox getUserPersonalMailboxForEmail(org.nuxeo.ecm.core.api.CoreSession session, String userEmail)
          Returns a mailbox for given email
 String getUserPersonalMailboxId(String user)
          Retrieves the Personal Mailbox Id from the Mailbox Creator.
 boolean hasMailbox(org.nuxeo.ecm.core.api.CoreSession session, String muid)
          Returns true if a mailbox with given id exists
 boolean hasUserPersonalMailbox(org.nuxeo.ecm.core.api.CoreSession session, String userId)
          Test if the user has a personal mailbox created
 List<MailboxHeader> searchMailboxes(org.nuxeo.ecm.core.api.CoreSession session, String pattern, String type)
          Search mailboxes with given pattern
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailboxManagementServiceImpl

public MailboxManagementServiceImpl()
Method Detail

getMailbox

public Mailbox getMailbox(org.nuxeo.ecm.core.api.CoreSession session,
                          String muid)
Description copied from interface: MailboxManagementService
Returns the mailbox with given unique identifier.

Specified by:
getMailbox in interface MailboxManagementService
muid - User id

hasMailbox

public boolean hasMailbox(org.nuxeo.ecm.core.api.CoreSession session,
                          String muid)
Description copied from interface: MailboxManagementService
Returns true if a mailbox with given id exists

Specified by:
hasMailbox in interface MailboxManagementService
muid - mailbox id

getMailboxHeader

public MailboxHeader getMailboxHeader(org.nuxeo.ecm.core.api.CoreSession session,
                                      String muid)
Specified by:
getMailboxHeader in interface MailboxManagementService

getMailboxes

public List<Mailbox> getMailboxes(org.nuxeo.ecm.core.api.CoreSession session,
                                  List<String> muids)
Description copied from interface: MailboxManagementService
Returns the mailboxes with given unique identifiers.

Specified by:
getMailboxes in interface MailboxManagementService
Parameters:
session - a Core Session
muids - Users ids

getMailboxesHeaders

public List<MailboxHeader> getMailboxesHeaders(org.nuxeo.ecm.core.api.CoreSession session,
                                               List<String> muids)
Description copied from interface: MailboxManagementService
Returns the mailboxes with given unique identifiers and a session. Giving session can be helpful when you already are in an unrestrictedSessionRunner.

Specified by:
getMailboxesHeaders in interface MailboxManagementService
Returns:

getUserMailboxes

public List<Mailbox> getUserMailboxes(org.nuxeo.ecm.core.api.CoreSession session,
                                      String user)
Description copied from interface: MailboxManagementService
Returns all mailboxes for given user. Creates a personal mailbox for real users if needed.

Specified by:
getUserMailboxes in interface MailboxManagementService
user - User id

getUserPersonalMailbox

public Mailbox getUserPersonalMailbox(org.nuxeo.ecm.core.api.CoreSession session,
                                      String user)
Description copied from interface: MailboxManagementService
Returns the personal mailbox of the given user.

Specified by:
getUserPersonalMailbox in interface MailboxManagementService
user - User id

createPersonalMailboxes

public List<Mailbox> createPersonalMailboxes(org.nuxeo.ecm.core.api.CoreSession session,
                                             String user)
Description copied from interface: MailboxManagementService
Create the personal Mailbox with the registered

Specified by:
createPersonalMailboxes in interface MailboxManagementService
Returns:
personal mailbox list.

getUserPersonalMailboxForEmail

public Mailbox getUserPersonalMailboxForEmail(org.nuxeo.ecm.core.api.CoreSession session,
                                              String userEmail)
Description copied from interface: MailboxManagementService
Returns a mailbox for given email

Specified by:
getUserPersonalMailboxForEmail in interface MailboxManagementService

searchMailboxes

public List<MailboxHeader> searchMailboxes(org.nuxeo.ecm.core.api.CoreSession session,
                                           String pattern,
                                           String type)
Description copied from interface: MailboxManagementService
Search mailboxes with given pattern

Specified by:
searchMailboxes in interface MailboxManagementService
pattern - matching the box title
type - mailbox type (generic, personal, etc... or null to match all)

hasUserPersonalMailbox

public boolean hasUserPersonalMailbox(org.nuxeo.ecm.core.api.CoreSession session,
                                      String userId)
Description copied from interface: MailboxManagementService
Test if the user has a personal mailbox created

Specified by:
hasUserPersonalMailbox in interface MailboxManagementService
Returns:
true if the user has a personal mailbox

getUserPersonalMailboxId

public String getUserPersonalMailboxId(String user)
Retrieves the Personal Mailbox Id from the Mailbox Creator.

Specified by:
getUserPersonalMailboxId in interface MailboxManagementService
Parameters:
user - Owner of the mailbox
Returns:
The personal Mailbox Id

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.