Nuxeo Enterprise Platform 5.4

org.nuxeo.cm.mailbox
Class MailboxImpl

java.lang.Object
  extended by org.nuxeo.cm.mailbox.MailboxImpl
All Implemented Interfaces:
Serializable, Comparable<Mailbox>, Mailbox
Direct Known Subclasses:
MailboxImpl

public class MailboxImpl
extends Object
implements Mailbox

Mailbox implementation using a document model as backend.

Author:
Anahide Tchertchian
See Also:
Serialized Form

Constructor Summary
MailboxImpl(org.nuxeo.ecm.core.api.DocumentModel doc)
           
 
Method Summary
 void addMailingList(MailingList ml)
           
 void addParticipantList(ParticipantsList mailinglist)
          Add the given mailing list to this mailbox
 int compareTo(Mailbox other)
           
 String getAffiliatedMailboxId()
           
 List<String> getAllUsers()
          Gets the list of member users of this mailbox.
 List<String> getAllUsersAndGroups()
           
 List<String> getChildrenIds(org.nuxeo.ecm.core.api.CoreSession session)
          Returns the children ids of this mailbox
 Integer getConfidentiality()
           
 String getDescription()
          Returns description of the mailbox.
 org.nuxeo.ecm.core.api.DocumentModel getDocument()
          Returns the document model representing this mailbox.
 List<String> getFavorites()
          Gets the list of mailbox ids used as favorites
 List<String> getGroups()
          Gets the list of member groups of this mailbox.
 String getId()
          Returns the mailbox identifier.
 Calendar getLastSyncUpdate()
           
 List<String> getMailingListIds()
           
 List<MailingList> getMailingLists()
          Gets the list of MailingList objects of this mailbox.
 MailingList getMailingListTemplate()
          Returns a new bare mailing list
 List<String> getNotifiedUsers()
          Gets a users sublist of delegates that should be notified when new casemanagement has arrived in this mailbox.
 String getOrigin()
           
 String getOwner()
          Returns owner of the mailbox.
 String getParentId(org.nuxeo.ecm.core.api.CoreSession session)
          Returns the parentId of this mailbox
 List<String> getParticipantListIds()
          Gets the id list of mailing lists of this mailbox.
 List<ParticipantsList> getParticipantLists()
          Gets the list of ParticipantsList objects of this mailbox.
 ParticipantsList getParticipantListTemplate()
          Returns a new bare mailing list.
 List<String> getProfiles()
          Gets profiles for this mailbox
 String getSynchronizerId()
           
 String getSynchronizeState()
           
 String getTitle()
          Returns title of the mailbox.
 String getType()
          Returns type of the mailbox.
 List<String> getUsers()
          Gets the list of users (delegates) of this mailbox.
 boolean hasProfile(String profile)
          Returns true if mailbox has given profile.
 Boolean isSynchronized()
           
 void removeMailingList(String mailingListId)
          Removes mailing list with given id from this mailbox.
 void removeParticipantList(String mailinglistId)
          Removes mailing list with given id from this mailbox.
 void save(org.nuxeo.ecm.core.api.CoreSession session)
          Persist the Mailbox
 void setAffiliatedMailboxId(String mbid)
          Sets the affiliated mailbox id.
 void setConfidentiality(Integer confidentiality)
          Sets the default confidentiality for icoming mails for this mailbox.
 void setDescription(String description)
          Sets description of the mailbox.
 void setFavorites(List<String> favorites)
          Sets the list of mailbox ids used as favorites
 void setGroups(List<String> groups)
          Sets the list of member groups for this mailbox.
 void setId(String id)
          Sets id of the mailbox.
 void setLastSyncUpdate(Calendar now)
          Sets the last time this mailbox has been updated by the synchronziation service.
 void setNotifiedUsers(List<String> users)
          Sets a users sublist of delegates that should be notified when new casemanagement has arrived in this mailbox.
 void setOrigin(String origin)
          Sets the origin of the Mailbox.
 void setOwner(String owner)
          Sets owner of the mailbox.
 void setProfiles(List<String> profiles)
          Sets profiles for this mailbox
 void setSynchronizerId(String synchronizerId)
          Set the given string parameter as mailbox's synchronizer ID.
 void setSynchronizeState(String state)
          Sets synchronize state of the mailbox
 void setTitle(String title)
          Sets title of the mailbox.
 void setType(String type)
          Sets type of the mailbox.
 void setUsers(List<String> users)
          Sets the list of users for this mailbox.
 Mailbox updateMailingList(MailingList currentMailingList)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailboxImpl

public MailboxImpl(org.nuxeo.ecm.core.api.DocumentModel doc)
Method Detail

getDocument

public org.nuxeo.ecm.core.api.DocumentModel getDocument()
Description copied from interface: Mailbox
Returns the document model representing this mailbox.

Specified by:
getDocument in interface Mailbox

getMailingListTemplate

public MailingList getMailingListTemplate()
Description copied from interface: Mailbox
Returns a new bare mailing list

Specified by:
getMailingListTemplate in interface Mailbox

addMailingList

public void addMailingList(MailingList ml)
Specified by:
addMailingList in interface Mailbox

getUsers

public List<String> getUsers()
Description copied from interface: Mailbox
Gets the list of users (delegates) of this mailbox.

Specified by:
getUsers in interface Mailbox

getDescription

public String getDescription()
Description copied from interface: Mailbox
Returns description of the mailbox.

Specified by:
getDescription in interface Mailbox

getFavorites

public List<String> getFavorites()
                          throws CaseManagementException
Description copied from interface: Mailbox
Gets the list of mailbox ids used as favorites

Specified by:
getFavorites in interface Mailbox
Throws:
CaseManagementException

getGroups

public List<String> getGroups()
Description copied from interface: Mailbox
Gets the list of member groups of this mailbox.

Specified by:
getGroups in interface Mailbox

getId

public String getId()
Description copied from interface: Mailbox
Returns the mailbox identifier.

Specified by:
getId in interface Mailbox

setId

public void setId(String id)
Description copied from interface: Mailbox
Sets id of the mailbox.

Specified by:
setId in interface Mailbox

getMailingListIds

public List<String> getMailingListIds()
Specified by:
getMailingListIds in interface Mailbox

getMailingLists

public List<MailingList> getMailingLists()
Description copied from interface: Mailbox
Gets the list of MailingList objects of this mailbox.

Specified by:
getMailingLists in interface Mailbox

updateMailingList

public Mailbox updateMailingList(MailingList currentMailingList)
Specified by:
updateMailingList in interface Mailbox
Returns:

getNotifiedUsers

public List<String> getNotifiedUsers()
Description copied from interface: Mailbox
Gets a users sublist of delegates that should be notified when new casemanagement has arrived in this mailbox.

Specified by:
getNotifiedUsers in interface Mailbox

getOwner

public String getOwner()
Description copied from interface: Mailbox
Returns owner of the mailbox.

Specified by:
getOwner in interface Mailbox

getProfiles

public List<String> getProfiles()
Description copied from interface: Mailbox
Gets profiles for this mailbox

Specified by:
getProfiles in interface Mailbox
Returns:

getTitle

public String getTitle()
Description copied from interface: Mailbox
Returns title of the mailbox.

Specified by:
getTitle in interface Mailbox

getType

public String getType()
Description copied from interface: Mailbox
Returns type of the mailbox.

Specified by:
getType in interface Mailbox

getAllUsers

public List<String> getAllUsers()
Description copied from interface: Mailbox
Gets the list of member users of this mailbox.

Contains delegates and owner.

Specified by:
getAllUsers in interface Mailbox

hasProfile

public boolean hasProfile(String profile)
Description copied from interface: Mailbox
Returns true if mailbox has given profile.

Specified by:
hasProfile in interface Mailbox

removeMailingList

public void removeMailingList(String mailingListId)
Description copied from interface: Mailbox
Removes mailing list with given id from this mailbox.

Specified by:
removeMailingList in interface Mailbox

setUsers

public void setUsers(List<String> users)
Description copied from interface: Mailbox
Sets the list of users for this mailbox.

Specified by:
setUsers in interface Mailbox

setDescription

public void setDescription(String description)
Description copied from interface: Mailbox
Sets description of the mailbox.

Specified by:
setDescription in interface Mailbox

setFavorites

public void setFavorites(List<String> favorites)
                  throws CaseManagementException
Description copied from interface: Mailbox
Sets the list of mailbox ids used as favorites

Specified by:
setFavorites in interface Mailbox
Throws:
CaseManagementException

setGroups

public void setGroups(List<String> groups)
Description copied from interface: Mailbox
Sets the list of member groups for this mailbox.

Specified by:
setGroups in interface Mailbox

setNotifiedUsers

public void setNotifiedUsers(List<String> users)
Description copied from interface: Mailbox
Sets a users sublist of delegates that should be notified when new casemanagement has arrived in this mailbox.

Specified by:
setNotifiedUsers in interface Mailbox

setOwner

public void setOwner(String owner)
Description copied from interface: Mailbox
Sets owner of the mailbox.

Specified by:
setOwner in interface Mailbox

setProfiles

public void setProfiles(List<String> profiles)
Description copied from interface: Mailbox
Sets profiles for this mailbox

Specified by:
setProfiles in interface Mailbox

setTitle

public void setTitle(String title)
Description copied from interface: Mailbox
Sets title of the mailbox.

Specified by:
setTitle in interface Mailbox

setType

public void setType(String type)
Description copied from interface: Mailbox
Sets type of the mailbox.

Specified by:
setType in interface Mailbox

setConfidentiality

public void setConfidentiality(Integer confidentiality)
Description copied from interface: Mailbox
Sets the default confidentiality for icoming mails for this mailbox.

Specified by:
setConfidentiality in interface Mailbox

getConfidentiality

public Integer getConfidentiality()
Specified by:
getConfidentiality in interface Mailbox

compareTo

public int compareTo(Mailbox other)
Specified by:
compareTo in interface Comparable<Mailbox>

save

public void save(org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: Mailbox
Persist the Mailbox

Specified by:
save in interface Mailbox

getParentId

public String getParentId(org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: Mailbox
Returns the parentId of this mailbox

Specified by:
getParentId in interface Mailbox

getChildrenIds

public List<String> getChildrenIds(org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: Mailbox
Returns the children ids of this mailbox

Specified by:
getChildrenIds in interface Mailbox

getAllUsersAndGroups

public List<String> getAllUsersAndGroups()
Specified by:
getAllUsersAndGroups in interface Mailbox
Returns:
list of all users and groups.

getAffiliatedMailboxId

public String getAffiliatedMailboxId()
Specified by:
getAffiliatedMailboxId in interface Mailbox
Returns:
the affiliated mailbox id. null if not affiliated mailbox exists.

setAffiliatedMailboxId

public void setAffiliatedMailboxId(String mbid)
Description copied from interface: Mailbox
Sets the affiliated mailbox id.

Specified by:
setAffiliatedMailboxId in interface Mailbox

getSynchronizeState

public String getSynchronizeState()
Specified by:
getSynchronizeState in interface Mailbox
Returns:
Mailbox current synchronized state

setSynchronizeState

public void setSynchronizeState(String state)
Description copied from interface: Mailbox
Sets synchronize state of the mailbox

Specified by:
setSynchronizeState in interface Mailbox

isSynchronized

public Boolean isSynchronized()
Specified by:
isSynchronized in interface Mailbox
Returns:
true if mailbox is synchronized

getSynchronizerId

public String getSynchronizerId()
Specified by:
getSynchronizerId in interface Mailbox
Returns:
mailbox's synchronizer ID.

setSynchronizerId

public void setSynchronizerId(String synchronizerId)
Description copied from interface: Mailbox
Set the given string parameter as mailbox's synchronizer ID.

Specified by:
setSynchronizerId in interface Mailbox

getLastSyncUpdate

public Calendar getLastSyncUpdate()
Specified by:
getLastSyncUpdate in interface Mailbox
Returns:
the last time this mailbox has been updated by the synchronziation service.

setLastSyncUpdate

public void setLastSyncUpdate(Calendar now)
Description copied from interface: Mailbox
Sets the last time this mailbox has been updated by the synchronziation service.

Specified by:
setLastSyncUpdate in interface Mailbox

getOrigin

public String getOrigin()
Specified by:
getOrigin in interface Mailbox
Returns:
The name of the directory from which it has been synchronized or an empty string if it has been created.

setOrigin

public void setOrigin(String origin)
Description copied from interface: Mailbox
Sets the origin of the Mailbox.

Specified by:
setOrigin in interface Mailbox

getParticipantListIds

public List<String> getParticipantListIds()
Description copied from interface: Mailbox
Gets the id list of mailing lists of this mailbox.

Specified by:
getParticipantListIds in interface Mailbox

getParticipantLists

public List<ParticipantsList> getParticipantLists()
Description copied from interface: Mailbox
Gets the list of ParticipantsList objects of this mailbox.

Specified by:
getParticipantLists in interface Mailbox

getParticipantListTemplate

public ParticipantsList getParticipantListTemplate()
Description copied from interface: Mailbox
Returns a new bare mailing list.

Specified by:
getParticipantListTemplate in interface Mailbox

addParticipantList

public void addParticipantList(ParticipantsList mailinglist)
Description copied from interface: Mailbox
Add the given mailing list to this mailbox

Specified by:
addParticipantList in interface Mailbox
Parameters:
mailinglist - the mailing list to add

removeParticipantList

public void removeParticipantList(String mailinglistId)
Description copied from interface: Mailbox
Removes mailing list with given id from this mailbox.

Specified by:
removeParticipantList in interface Mailbox

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.