Nuxeo Enterprise Platform 5.4

org.nuxeo.cm.cases
Class CaseTreeHelper

java.lang.Object
  extended by org.nuxeo.cm.cases.CaseTreeHelper

public class CaseTreeHelper
extends Object

Helper for mail tree

Emails and Mail envelopes are created within trees of folder.

Author:
Anahide Tchertchian

Field Summary
static String DELETED_STATE
           
static String TITLE_PROPERTY_NAME
           
 
Constructor Summary
CaseTreeHelper()
           
 
Method Summary
static org.nuxeo.ecm.core.api.DocumentModel getOrCreate(org.nuxeo.ecm.core.api.CoreSession session, String rootPath, String id, String folderType)
           
static org.nuxeo.ecm.core.api.DocumentModel getOrCreateDateTreeFolder(org.nuxeo.ecm.core.api.CoreSession session, org.nuxeo.ecm.core.api.DocumentModel root, Date date, String folderType)
          Find or create a set of folders representing the date hierarchy
static org.nuxeo.ecm.core.api.DocumentModel getOrCreatePath(org.nuxeo.ecm.core.api.CoreSession session, org.nuxeo.ecm.core.api.DocumentModel root, String subPath, String folderType)
           
static org.nuxeo.ecm.core.api.DocumentModel getOrCreateTxDateTreeFolder(org.nuxeo.ecm.core.api.CoreSession session, org.nuxeo.ecm.core.api.DocumentModel root, Date date, String folderType)
          Find or create a set of folders representing the date hierarchy.
static org.nuxeo.ecm.core.api.DocumentModel getOrCreateTxPath(org.nuxeo.ecm.core.api.CoreSession session, org.nuxeo.ecm.core.api.DocumentModel rootDocument, String subPath, String folderType)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TITLE_PROPERTY_NAME

public static final String TITLE_PROPERTY_NAME
See Also:
Constant Field Values

DELETED_STATE

public static final String DELETED_STATE
See Also:
Constant Field Values
Constructor Detail

CaseTreeHelper

public CaseTreeHelper()
Method Detail

getOrCreateDateTreeFolder

public static org.nuxeo.ecm.core.api.DocumentModel getOrCreateDateTreeFolder(org.nuxeo.ecm.core.api.CoreSession session,
                                                                             org.nuxeo.ecm.core.api.DocumentModel root,
                                                                             Date date,
                                                                             String folderType)
                                                                      throws org.nuxeo.ecm.core.api.ClientException
Find or create a set of folders representing the date hierarchy

Returns:
the last child created (day)
Throws:
org.nuxeo.ecm.core.api.ClientException

getOrCreatePath

public static org.nuxeo.ecm.core.api.DocumentModel getOrCreatePath(org.nuxeo.ecm.core.api.CoreSession session,
                                                                   org.nuxeo.ecm.core.api.DocumentModel root,
                                                                   String subPath,
                                                                   String folderType)
                                                            throws org.nuxeo.ecm.core.api.ClientException
Throws:
org.nuxeo.ecm.core.api.ClientException

getOrCreate

public static org.nuxeo.ecm.core.api.DocumentModel getOrCreate(org.nuxeo.ecm.core.api.CoreSession session,
                                                               String rootPath,
                                                               String id,
                                                               String folderType)
                                                        throws org.nuxeo.ecm.core.api.ClientException
Throws:
org.nuxeo.ecm.core.api.ClientException

getOrCreateTxDateTreeFolder

public static final org.nuxeo.ecm.core.api.DocumentModel getOrCreateTxDateTreeFolder(org.nuxeo.ecm.core.api.CoreSession session,
                                                                                     org.nuxeo.ecm.core.api.DocumentModel root,
                                                                                     Date date,
                                                                                     String folderType)
                                                                              throws org.nuxeo.ecm.core.api.ClientException
Find or create a set of folders representing the date hierarchy. This method is starting and stopping transactions, so caller should make sure no transaction is active (commit before, start a new transaction after)

Throws:
org.nuxeo.ecm.core.api.ClientException
Since:
1.7

getOrCreateTxPath

public static final org.nuxeo.ecm.core.api.DocumentModel getOrCreateTxPath(org.nuxeo.ecm.core.api.CoreSession session,
                                                                           org.nuxeo.ecm.core.api.DocumentModel rootDocument,
                                                                           String subPath,
                                                                           String folderType)
                                                                    throws org.nuxeo.ecm.core.api.ClientException
Throws:
org.nuxeo.ecm.core.api.ClientException

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.