Nuxeo Enterprise Platform 5.4

org.nuxeo.cm.core.service
Class CaseDistributionServiceImpl

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

public class CaseDistributionServiceImpl
extends Object
implements CaseDistributionService

Correspondence service core implementation

See Also:
Serialized Form

Nested Class Summary
 class CaseDistributionServiceImpl.SendPostUnrestricted
           
 
Constructor Summary
CaseDistributionServiceImpl()
           
 
Method Summary
 CaseItem addCaseItemToCase(org.nuxeo.ecm.core.api.CoreSession session, Case kase, org.nuxeo.ecm.core.api.DocumentModel emailDoc)
          Add a CaseItem to a Case
 Case createCase(org.nuxeo.ecm.core.api.CoreSession session, org.nuxeo.ecm.core.api.DocumentModel emailDoc)
           
 Case createCase(org.nuxeo.ecm.core.api.CoreSession session, org.nuxeo.ecm.core.api.DocumentModel emailDoc, List<Mailbox> mailboxes)
           
 Case createCaseFromExistingCaseItem(CaseItem item, org.nuxeo.ecm.core.api.CoreSession session)
          This method calls CaseManagementPersister to create a Case from the given CaseItem
 CaseLink createDraftCaseLink(org.nuxeo.ecm.core.api.CoreSession session, Mailbox mailbox, Case envelope)
          Create a draft post for an envelope in given mailbox.
 Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session, org.nuxeo.ecm.core.api.DocumentModel caseDoc, Date date, List<Mailbox> mailboxes)
           
 Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session, org.nuxeo.ecm.core.api.DocumentModel caseDoc, List<Mailbox> mailboxes)
           
 Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session, org.nuxeo.ecm.core.api.DocumentModel caseDoc, Mailbox mailbox)
           
 Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session, String title, String id, List<Mailbox> mailboxes)
           
 Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session, String title, String id, Mailbox mailbox)
           
 Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session, String title, String id, String type, Date date, List<Mailbox> mailboxes)
           
 Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session, String title, String id, String type, List<Mailbox> mailboxes)
           
 List<CaseLink> getCaseLinks(org.nuxeo.ecm.core.api.CoreSession session, Mailbox mailbox, Case kase)
          Returns all the case links for this kase in this mailbox.
 CaseLink getDraftCaseLink(org.nuxeo.ecm.core.api.CoreSession coreSession, Mailbox mailbox, String envelopeId)
          Returns the draft post of an envelope in given mailbox.
 List<CaseLink> getDraftCaseLinks(org.nuxeo.ecm.core.api.CoreSession coreSession, Mailbox mailbox, long offset, long limit)
          Returns the draft posts for given mailbox
 org.nuxeo.ecm.core.api.DocumentModel getParentDocumentForCase(org.nuxeo.ecm.core.api.CoreSession session)
          This method calls CaseManagementPersister to find the parent document of a case to be created.
 org.nuxeo.ecm.core.api.DocumentModel getParentDocumentForCase(org.nuxeo.ecm.core.api.CoreSession session, Date date)
          This method calls CaseManagementPersister to find the parent document of a case to be created.
 String getParentDocumentPathForCase(org.nuxeo.ecm.core.api.CoreSession session)
          This method calls CaseManagementPersister to find the parent document path of a case to be created.
 String getParentDocumentPathForCase(org.nuxeo.ecm.core.api.CoreSession session, Date date)
          This method calls CaseManagementPersister to find the parent document path of a case to be created.
 String getParentDocumentPathForCaseItem(org.nuxeo.ecm.core.api.CoreSession session, Case kase)
          This method calls CaseManagementPersister to find the parent document path of a CaseItem to be created.
 List<CaseLink> getReceivedCaseLinks(org.nuxeo.ecm.core.api.CoreSession coreSession, Mailbox mailbox, long offset, long limit)
          Returns the received posts for given mailbox
 List<CaseLink> getSentCaseLinks(org.nuxeo.ecm.core.api.CoreSession coreSession, Mailbox mailbox, long offset, long limit)
          Returns the sent posts for given mailbox
 CaseManagementDocumentTypeService getTypeService()
           
 void notify(org.nuxeo.ecm.core.api.CoreSession session, String name, org.nuxeo.ecm.core.api.DocumentModel document, Map<String,Serializable> eventProperties)
          Throw a core event.
 void removeCaseLink(CaseLink link, org.nuxeo.ecm.core.api.CoreSession session)
          Remove a case link from the mailbox.
 CaseLink sendCase(org.nuxeo.ecm.core.api.CoreSession session, CaseLink postRequest, boolean isInitial)
          Send an envelope to a mailbox.
 CaseLink sendCase(org.nuxeo.ecm.core.api.CoreSession session, CaseLink postRequest, boolean isInitial, boolean actionable)
          Send an case to a mailbox.
 CaseLink sendCase(org.nuxeo.ecm.core.api.CoreSession session, String origin, Case kase, DistributionInfo initialDistribution)
          Distributes a case to a mailbox.
 void setPathSegmentService(org.nuxeo.ecm.core.api.pathsegment.PathSegmentService pathSegmentService)
           
 void setPersister(CaseManagementPersister persister)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaseDistributionServiceImpl

public CaseDistributionServiceImpl()
Method Detail

setPersister

public void setPersister(CaseManagementPersister persister)

setPathSegmentService

public void setPathSegmentService(org.nuxeo.ecm.core.api.pathsegment.PathSegmentService pathSegmentService)

sendCase

public CaseLink sendCase(org.nuxeo.ecm.core.api.CoreSession session,
                         CaseLink postRequest,
                         boolean isInitial)
Description copied from interface: CaseDistributionService
Send an envelope to a mailbox.

Specified by:
sendCase in interface CaseDistributionService

sendCase

public CaseLink sendCase(org.nuxeo.ecm.core.api.CoreSession session,
                         CaseLink postRequest,
                         boolean isInitial,
                         boolean actionable)
Description copied from interface: CaseDistributionService
Send an case to a mailbox.

Specified by:
sendCase in interface CaseDistributionService

sendCase

public CaseLink sendCase(org.nuxeo.ecm.core.api.CoreSession session,
                         String origin,
                         Case kase,
                         DistributionInfo initialDistribution)
Description copied from interface: CaseDistributionService
Distributes a case to a mailbox. the case is not currently in any mailbox, (it was created by import for example)

Specified by:
sendCase in interface CaseDistributionService

getReceivedCaseLinks

public List<CaseLink> getReceivedCaseLinks(org.nuxeo.ecm.core.api.CoreSession coreSession,
                                           Mailbox mailbox,
                                           long offset,
                                           long limit)
Description copied from interface: CaseDistributionService
Returns the received posts for given mailbox

Specified by:
getReceivedCaseLinks in interface CaseDistributionService

getCaseLinks

public List<CaseLink> getCaseLinks(org.nuxeo.ecm.core.api.CoreSession session,
                                   Mailbox mailbox,
                                   Case kase)
Description copied from interface: CaseDistributionService
Returns all the case links for this kase in this mailbox.

Specified by:
getCaseLinks in interface CaseDistributionService
mailbox - if null returns the links of all mailboxes.
Returns:

getSentCaseLinks

public List<CaseLink> getSentCaseLinks(org.nuxeo.ecm.core.api.CoreSession coreSession,
                                       Mailbox mailbox,
                                       long offset,
                                       long limit)
Description copied from interface: CaseDistributionService
Returns the sent posts for given mailbox

Specified by:
getSentCaseLinks in interface CaseDistributionService

getDraftCaseLinks

public List<CaseLink> getDraftCaseLinks(org.nuxeo.ecm.core.api.CoreSession coreSession,
                                        Mailbox mailbox,
                                        long offset,
                                        long limit)
Description copied from interface: CaseDistributionService
Returns the draft posts for given mailbox

Specified by:
getDraftCaseLinks in interface CaseDistributionService

addCaseItemToCase

public CaseItem addCaseItemToCase(org.nuxeo.ecm.core.api.CoreSession session,
                                  Case kase,
                                  org.nuxeo.ecm.core.api.DocumentModel emailDoc)
Description copied from interface: CaseDistributionService
Add a CaseItem to a Case

Specified by:
addCaseItemToCase in interface CaseDistributionService
Parameters:
session - The core session
kase - The case in which the CaseItem will be added
emailDoc - The document model for the CaseItem
Returns:

createCase

public Case createCase(org.nuxeo.ecm.core.api.CoreSession session,
                       org.nuxeo.ecm.core.api.DocumentModel emailDoc,
                       List<Mailbox> mailboxes)
Specified by:
createCase in interface CaseDistributionService
mailboxes - The list of mailboxes in which the document will be seen.
Returns:
a MailEnvelope containing default MailItem.

createCase

public Case createCase(org.nuxeo.ecm.core.api.CoreSession session,
                       org.nuxeo.ecm.core.api.DocumentModel emailDoc)
Specified by:
createCase in interface CaseDistributionService
Returns:
a MailEnvelope containing default MailItem.

createEmptyCase

public Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session,
                            String title,
                            String id,
                            Mailbox mailbox)
Specified by:
createEmptyCase in interface CaseDistributionService

createEmptyCase

public Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session,
                            String title,
                            String id,
                            List<Mailbox> mailboxes)
Specified by:
createEmptyCase in interface CaseDistributionService

createEmptyCase

public Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session,
                            String title,
                            String id,
                            String type,
                            List<Mailbox> mailboxes)
Specified by:
createEmptyCase in interface CaseDistributionService

createEmptyCase

public Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session,
                            String title,
                            String id,
                            String type,
                            Date date,
                            List<Mailbox> mailboxes)
Specified by:
createEmptyCase in interface CaseDistributionService

getTypeService

public CaseManagementDocumentTypeService getTypeService()

createEmptyCase

public Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session,
                            org.nuxeo.ecm.core.api.DocumentModel caseDoc,
                            Mailbox mailbox)
Specified by:
createEmptyCase in interface CaseDistributionService
Returns:
an emptyCase

createEmptyCase

public Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session,
                            org.nuxeo.ecm.core.api.DocumentModel caseDoc,
                            Date date,
                            List<Mailbox> mailboxes)

createEmptyCase

public Case createEmptyCase(org.nuxeo.ecm.core.api.CoreSession session,
                            org.nuxeo.ecm.core.api.DocumentModel caseDoc,
                            List<Mailbox> mailboxes)
Specified by:
createEmptyCase in interface CaseDistributionService

createDraftCaseLink

public CaseLink createDraftCaseLink(org.nuxeo.ecm.core.api.CoreSession session,
                                    Mailbox mailbox,
                                    Case envelope)
Description copied from interface: CaseDistributionService
Create a draft post for an envelope in given mailbox.

Specified by:
createDraftCaseLink in interface CaseDistributionService

getDraftCaseLink

public CaseLink getDraftCaseLink(org.nuxeo.ecm.core.api.CoreSession coreSession,
                                 Mailbox mailbox,
                                 String envelopeId)
Description copied from interface: CaseDistributionService
Returns the draft post of an envelope in given mailbox. Returns null if post is not found.

Specified by:
getDraftCaseLink in interface CaseDistributionService

removeCaseLink

public void removeCaseLink(CaseLink link,
                           org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: CaseDistributionService
Remove a case link from the mailbox. It is the duty of a listener to update the security on the case if necessary.

Specified by:
removeCaseLink in interface CaseDistributionService

notify

public void notify(org.nuxeo.ecm.core.api.CoreSession session,
                   String name,
                   org.nuxeo.ecm.core.api.DocumentModel document,
                   Map<String,Serializable> eventProperties)
Description copied from interface: CaseDistributionService
Throw a core event.

Specified by:
notify in interface CaseDistributionService
Parameters:
session - The session use in the event context and to get the principal.
name - the name of the event
document - The document use for DocumentEventContext
eventProperties - The properties used in the event context.

getParentDocumentForCase

public org.nuxeo.ecm.core.api.DocumentModel getParentDocumentForCase(org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: CaseDistributionService
This method calls CaseManagementPersister to find the parent document of a case to be created.

Specified by:
getParentDocumentForCase in interface CaseDistributionService
Returns:
the case Parent Document

getParentDocumentForCase

public org.nuxeo.ecm.core.api.DocumentModel getParentDocumentForCase(org.nuxeo.ecm.core.api.CoreSession session,
                                                                     Date date)
Description copied from interface: CaseDistributionService
This method calls CaseManagementPersister to find the parent document of a case to be created.

Specified by:
getParentDocumentForCase in interface CaseDistributionService
Returns:
the case Parent Document

getParentDocumentPathForCaseItem

public String getParentDocumentPathForCaseItem(org.nuxeo.ecm.core.api.CoreSession session,
                                               Case kase)
Description copied from interface: CaseDistributionService
This method calls CaseManagementPersister to find the parent document path of a CaseItem to be created.

Specified by:
getParentDocumentPathForCaseItem in interface CaseDistributionService
Returns:

getParentDocumentPathForCase

public String getParentDocumentPathForCase(org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: CaseDistributionService
This method calls CaseManagementPersister to find the parent document path of a case to be created.

Specified by:
getParentDocumentPathForCase in interface CaseDistributionService
Returns:

getParentDocumentPathForCase

public String getParentDocumentPathForCase(org.nuxeo.ecm.core.api.CoreSession session,
                                           Date date)
Description copied from interface: CaseDistributionService
This method calls CaseManagementPersister to find the parent document path of a case to be created.

Specified by:
getParentDocumentPathForCase in interface CaseDistributionService
Returns:

createCaseFromExistingCaseItem

public Case createCaseFromExistingCaseItem(CaseItem item,
                                           org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: CaseDistributionService
This method calls CaseManagementPersister to create a Case from the given CaseItem

Specified by:
createCaseFromExistingCaseItem in interface CaseDistributionService
Returns:

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.