Nuxeo Enterprise Platform 5.4

org.nuxeo.cm.cases
Class CaseItemImpl

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

public class CaseItemImpl
extends Object
implements CaseItem

Author:
Anahide Tchertchian, Alexandre Russel
See Also:
Serialized Form

Constructor Summary
CaseItemImpl(org.nuxeo.ecm.core.api.DocumentModel document, HasParticipants recipientAdapter)
           
 
Method Summary
 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.
 Case createMailCase(org.nuxeo.ecm.core.api.CoreSession session, String parentPath, String initialLifeCycleState)
          Creates a mail envelope with this item inside.
 boolean equals(Object other)
          Overrides equality to check documents equality
 Map<String,List<String>> getAllParticipants()
          Gets the list of all recipients keyed by type.
 Case getCase()
          Gets the envelope this document is in.
 org.nuxeo.ecm.core.api.DocumentModelList getCases(org.nuxeo.ecm.core.api.CoreSession session)
           
 String getConfidentiality()
          Gets the confidentiality of the document.
 String getDefaultCaseId()
          Gets the envelope in which this item should be shown if not associated with an envelope.
 org.nuxeo.ecm.core.api.DocumentModel getDocument()
          Returns the mail document.
 Calendar getDocumentDate()
          Gets the date on the item.
 Calendar getImportDate()
          Sets the item the item was imported into Nuxeo.
 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.
 String getOrigin()
          Gets the origin of the document (email, scan ...).
 Calendar getReceiveDate()
          Gets the date item was received.
 Calendar getSendingDate()
          Gets the date the item was sent.
 String getTitle()
          Gets the title of this item.
 String getType()
          Get the type of document.
 boolean hasSeveralCases(org.nuxeo.ecm.core.api.CoreSession coreSession)
           
 void save(org.nuxeo.ecm.core.api.CoreSession session)
          Persists the item.
 void setCase(Case envelope)
           
 void setConfidentiality(String cdf)
           
 void setDefaultCase(String mailEnvelopeId)
           
 void setDocumentDate(Calendar date)
           
 void setImportDate(Calendar date)
           
 void setOrigin(String origin)
           
 void setReceiveDate(Calendar date)
           
 void setSendingDate(Calendar date)
           
 void setTitle(String title)
           
 void setType(String type)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CaseItemImpl

public CaseItemImpl(org.nuxeo.ecm.core.api.DocumentModel document,
                    HasParticipants recipientAdapter)
Method Detail

getDocument

public org.nuxeo.ecm.core.api.DocumentModel getDocument()
Description copied from interface: CaseItem
Returns the mail document.

Specified by:
getDocument in interface CaseItem

getConfidentiality

public String getConfidentiality()
Description copied from interface: CaseItem
Gets the confidentiality of the document. The default is 4.

Specified by:
getConfidentiality in interface CaseItem

getTitle

public String getTitle()
Description copied from interface: CaseItem
Gets the title of this item.

Specified by:
getTitle in interface CaseItem

setTitle

public void setTitle(String title)
Specified by:
setTitle in interface CaseItem

getDefaultCaseId

public String getDefaultCaseId()
Description copied from interface: CaseItem
Gets the envelope in which this item should be shown if not associated with an envelope.

If you find this item from a search, we still have to show it in an envelope. This method tell us in which envelope to put it.

Specified by:
getDefaultCaseId in interface CaseItem

getDocumentDate

public Calendar getDocumentDate()
Description copied from interface: CaseItem
Gets the date on the item.

Specified by:
getDocumentDate in interface CaseItem

getCase

public Case getCase()
Description copied from interface: CaseItem
Gets the envelope this document is in. This value only is only set when it is coming from an envelope in the current session.

Specified by:
getCase in interface CaseItem
Returns:
the envelope or null if the document is not associated with an envelope.

getImportDate

public Calendar getImportDate()
Description copied from interface: CaseItem
Sets the item the item was imported into Nuxeo.

Specified by:
getImportDate in interface CaseItem

getOrigin

public String getOrigin()
Description copied from interface: CaseItem
Gets the origin of the document (email, scan ...).

Specified by:
getOrigin in interface CaseItem

getReceiveDate

public Calendar getReceiveDate()
Description copied from interface: CaseItem
Gets the date item was received.

Specified by:
getReceiveDate in interface CaseItem

getSendingDate

public Calendar getSendingDate()
Description copied from interface: CaseItem
Gets the date the item was sent.

Specified by:
getSendingDate in interface CaseItem

getType

public String getType()
Description copied from interface: CaseItem
Get the type of document.

Specified by:
getType in interface CaseItem

setConfidentiality

public void setConfidentiality(String cdf)
Specified by:
setConfidentiality in interface CaseItem

setDefaultCase

public void setDefaultCase(String mailEnvelopeId)
Specified by:
setDefaultCase in interface CaseItem

setDocumentDate

public void setDocumentDate(Calendar date)
Specified by:
setDocumentDate in interface CaseItem

setCase

public void setCase(Case envelope)
Specified by:
setCase in interface CaseItem

setImportDate

public void setImportDate(Calendar date)
Specified by:
setImportDate in interface CaseItem

setOrigin

public void setOrigin(String origin)
Specified by:
setOrigin in interface CaseItem

setReceiveDate

public void setReceiveDate(Calendar date)
Specified by:
setReceiveDate in interface CaseItem

setSendingDate

public void setSendingDate(Calendar date)
Specified by:
setSendingDate in interface CaseItem

setType

public void setType(String type)
Specified by:
setType in interface CaseItem

equals

public boolean equals(Object other)
Overrides equality to check documents equality

Overrides:
equals in class Object

save

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

Specified by:
save in interface CaseItem

createMailCase

public Case createMailCase(org.nuxeo.ecm.core.api.CoreSession session,
                           String parentPath,
                           String initialLifeCycleState)
Description copied from interface: CaseItem
Creates a mail envelope with this item inside.

Specified by:
createMailCase in interface CaseItem
Parameters:
session - an open session.
parentPath - the path to the folder in which the envelope will be created.
Returns:
The created mail envelope.

toString

public String toString()
Overrides:
toString in class Object

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

getCases

public org.nuxeo.ecm.core.api.DocumentModelList getCases(org.nuxeo.ecm.core.api.CoreSession session)
Specified by:
getCases in interface CaseItem
Returns:
list of cases containing the case item.

hasSeveralCases

public boolean hasSeveralCases(org.nuxeo.ecm.core.api.CoreSession coreSession)
Specified by:
hasSeveralCases in interface CaseItem
Returns:
true if case item is in more than one case.

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.