Nuxeo Enterprise Platform 5.4

org.nuxeo.cm.ejb
Class CaseDistributionBean

java.lang.Object
  extended by org.nuxeo.cm.ejb.CaseDistributionBean
All Implemented Interfaces:
Serializable, CaseDistributionService

public class CaseDistributionBean
extends Object
implements CaseDistributionService

See Also:
Serialized Form

Constructor Summary
CaseDistributionBean()
           
 
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 adapter, org.nuxeo.ecm.core.api.CoreSession documentManager)
          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, 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 session, 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
 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 sessiion)
          Remove a case link from the mailbox.
 CaseLink sendCase(org.nuxeo.ecm.core.api.CoreSession session, CaseLink postRequest, boolean initial)
          Send an envelope to a mailbox.
 CaseLink sendCase(org.nuxeo.ecm.core.api.CoreSession session, CaseLink postRequest, boolean initial, boolean isActionable)
          Send an case to a mailbox.
 CaseLink sendCase(org.nuxeo.ecm.core.api.CoreSession session, String sender, Case kase, DistributionInfo initialDistribution)
          Distributes a case to a mailbox.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaseDistributionBean

public CaseDistributionBean()
Method Detail

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.

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.

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 session,
                                 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

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

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

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

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.

sendCase

public CaseLink sendCase(org.nuxeo.ecm.core.api.CoreSession session,
                         CaseLink postRequest,
                         boolean initial)
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 initial,
                         boolean isActionable)
Description copied from interface: CaseDistributionService
Send an case to a mailbox.

Specified by:
sendCase 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:

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:

removeCaseLink

public void removeCaseLink(CaseLink link,
                           org.nuxeo.ecm.core.api.CoreSession sessiion)
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

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

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

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 adapter,
                                           org.nuxeo.ecm.core.api.CoreSession documentManager)
Description copied from interface: CaseDistributionService
This method calls CaseManagementPersister to create a Case from the given CaseItem

Specified by:
createCaseFromExistingCaseItem in interface CaseDistributionService
Returns:

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:

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

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,
                            Mailbox mailbox)
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

sendCase

public CaseLink sendCase(org.nuxeo.ecm.core.api.CoreSession session,
                         String sender,
                         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

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.