Nuxeo Enterprise Platform 5.4

org.nuxeo.cm.cases
Class CaseImpl

java.lang.Object
  extended by org.nuxeo.cm.cases.CaseImpl
All Implemented Interfaces:
Serializable, Case, HasParticipants

public class CaseImpl
extends Object
implements Case

Author:
Anahide Tchertchian
See Also:
Serialized Form

Constructor Summary
CaseImpl(org.nuxeo.ecm.core.api.DocumentModel envelope, HasParticipants recipientsAdapter)
           
 
Method Summary
 boolean addCaseItem(CaseItem item, org.nuxeo.ecm.core.api.CoreSession session)
          Adds given item to the envelope.
 void addInitialExternalParticipants(Map<String,List<String>> recipients)
          Adds to the list of initial external recipients.
 void addInitialInternalParticipants(Map<String,List<String>> recipients)
          Adds to the list of initial internal recipients.
 void addParticipants(Map<String,List<String>> recipients)
          Adds to the list of recipients.
 boolean canFollowTransition(String transition)
           
 void followTransition(String transition)
          Follow the given transition.
 Map<String,List<String>> getAllParticipants()
          Gets the list of all recipients keyed by type.
 List<CaseItem> getCaseItems(org.nuxeo.ecm.core.api.CoreSession session)
          Returns unmodifiable list of items.
 org.nuxeo.ecm.core.api.DocumentModel getDocument()
          Gets the document model describing the envelope.
 List<org.nuxeo.ecm.core.api.DocumentModel> getDocuments()
          Gets the items as document with the session of the envelope.
 List<org.nuxeo.ecm.core.api.DocumentModel> getDocuments(org.nuxeo.ecm.core.api.CoreSession session)
          Gets the items as document
 CaseItem getFirstItem(org.nuxeo.ecm.core.api.CoreSession session)
          Gets the first document within this envelope
 Map<String,List<String>> getInitialExternalParticipants()
          Gets the list of initial external recipients keyed by type.
 Map<String,List<String>> getInitialInternalParticipants()
          Gets the list of initial internal recipients keyed by type.
 boolean isDraft()
          Is this a draft envelope?
 boolean isEmpty()
          Is this an empty envelope?
 boolean moveDownEmailsInCase(List<CaseItem> selected, org.nuxeo.ecm.core.api.CoreSession session)
          Moves down given selected items in the envelope.
 boolean moveUpEmailsInCase(List<CaseItem> selected, org.nuxeo.ecm.core.api.CoreSession session)
          Moves up given selected items in the envelope.
 boolean removeCaseItem(CaseItem item, org.nuxeo.ecm.core.api.CoreSession session)
          Removes given item from the envelope.
 void save(org.nuxeo.ecm.core.api.CoreSession session)
          Persists the envelope.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaseImpl

public CaseImpl(org.nuxeo.ecm.core.api.DocumentModel envelope,
                HasParticipants recipientsAdapter)
Method Detail

getDocument

public org.nuxeo.ecm.core.api.DocumentModel getDocument()
Description copied from interface: Case
Gets the document model describing the envelope.

Specified by:
getDocument in interface Case

getCaseItems

public List<CaseItem> getCaseItems(org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: Case
Returns unmodifiable list of items.

Specified by:
getCaseItems in interface Case

getFirstItem

public CaseItem getFirstItem(org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: Case
Gets the first document within this envelope

Specified by:
getFirstItem in interface Case

addCaseItem

public boolean addCaseItem(CaseItem item,
                           org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: Case
Adds given item to the envelope.

Specified by:
addCaseItem in interface Case
Returns:
true if added, false if item was already present.

removeCaseItem

public boolean removeCaseItem(CaseItem item,
                              org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: Case
Removes given item from the envelope.

Specified by:
removeCaseItem in interface Case
Returns:
true if added, false if item was not present.

moveUpEmailsInCase

public boolean moveUpEmailsInCase(List<CaseItem> selected,
                                  org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: Case
Moves up given selected items in the envelope.

Specified by:
moveUpEmailsInCase in interface Case
Returns:
true if moved up, false if some could not be moved.

moveDownEmailsInCase

public boolean moveDownEmailsInCase(List<CaseItem> selected,
                                    org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: Case
Moves down given selected items in the envelope.

Specified by:
moveDownEmailsInCase in interface Case
Returns:
true if moved down, false if some could not be moved.

save

public void save(org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: Case
Persists the envelope.

Specified by:
save in interface Case

getDocuments

public List<org.nuxeo.ecm.core.api.DocumentModel> getDocuments()
Description copied from interface: Case
Gets the items as document with the session of the envelope.

Specified by:
getDocuments in interface Case

getDocuments

public List<org.nuxeo.ecm.core.api.DocumentModel> getDocuments(org.nuxeo.ecm.core.api.CoreSession session)
Description copied from interface: Case
Gets the items as document

Specified by:
getDocuments in interface Case

isDraft

public boolean isDraft()
                throws org.nuxeo.ecm.core.api.ClientException
Description copied from interface: Case
Is this a draft envelope?

Specified by:
isDraft in interface Case
Throws:
org.nuxeo.ecm.core.api.ClientException

isEmpty

public boolean isEmpty()
                throws org.nuxeo.ecm.core.api.ClientException
Description copied from interface: Case
Is this an empty envelope?

Specified by:
isEmpty in interface Case
Throws:
org.nuxeo.ecm.core.api.ClientException

addInitialExternalParticipants

public void addInitialExternalParticipants(Map<String,List<String>> recipients)
Description copied from interface: HasParticipants
Adds to the list of initial external recipients.

Specified by:
addInitialExternalParticipants in interface HasParticipants
Parameters:
recipients - A map keyed with the message type and valued with a list of Mailbox

addInitialInternalParticipants

public void addInitialInternalParticipants(Map<String,List<String>> recipients)
Description copied from interface: HasParticipants
Adds to the list of initial internal recipients.

Specified by:
addInitialInternalParticipants in interface HasParticipants
Parameters:
recipients - A map keyed with the message type and valued with a list of Mailbox

addParticipants

public void addParticipants(Map<String,List<String>> recipients)
Description copied from interface: HasParticipants
Adds to the list of recipients.

Specified by:
addParticipants in interface HasParticipants
Parameters:
recipients - A map keyed with the message type and valued with a list of Mailbox

getAllParticipants

public Map<String,List<String>> getAllParticipants()
Description copied from interface: HasParticipants
Gets the list of all recipients keyed by type.

Specified by:
getAllParticipants in interface HasParticipants

getInitialExternalParticipants

public Map<String,List<String>> getInitialExternalParticipants()
Description copied from interface: HasParticipants
Gets the list of initial external recipients keyed by type.

Specified by:
getInitialExternalParticipants in interface HasParticipants

getInitialInternalParticipants

public Map<String,List<String>> getInitialInternalParticipants()
Description copied from interface: HasParticipants
Gets the list of initial internal recipients keyed by type.

Specified by:
getInitialInternalParticipants in interface HasParticipants

canFollowTransition

public boolean canFollowTransition(String transition)
Specified by:
canFollowTransition in interface Case
Returns:
true if the case can follow given transition.

followTransition

public void followTransition(String transition)
Description copied from interface: Case
Follow the given transition.

Specified by:
followTransition in interface Case

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.