Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.api
Class DocumentModelFactory

java.lang.Object
  extended by org.nuxeo.ecm.core.api.DocumentModelFactory

public class DocumentModelFactory
extends java.lang.Object

DocumentModel factory for document models initialization.

Author:
bstefanescu

Method Summary
static DocumentModelImpl createDocumentModel(Document doc)
           
static DocumentModelImpl createDocumentModel(Document doc, java.lang.String[] schemas)
           
static DocumentModelImpl createDocumentModel(DocumentType docType)
          Creates a new document model using only required information to be used on client side.
static DocumentModelImpl createDocumentModel(java.lang.String sessionId, DocumentType docType)
          Creates a new document model using only required information to be used on client side.
static DocumentModelImpl createDocumentModel(java.lang.String parentPath, java.lang.String id, DocumentType docType, java.lang.String[] schemas)
          Creates a new document model using only required information to be used on client side.
static java.util.Map<java.lang.String,java.lang.Object> exportComplexProperty(java.lang.String sid, DocumentRef docRef, Property property)
           
static DataModel exportSchema_OLD(java.lang.String sid, DocumentRef docRef, Document doc, Schema schema)
           
static DataModel exportSchema(java.lang.String sid, DocumentRef docRef, Document doc, Schema schema)
           
static DocumentModel newDocument(DocumentModel parent, DocumentType type)
           
static DocumentModel newDocument(DocumentModel parent, java.lang.String type)
           
static DocumentModel newDocument(DocumentModel parent, java.lang.String name, DocumentType type)
           
static DocumentModel newDocument(DocumentModel parent, java.lang.String name, java.lang.String type)
           
static java.util.Map<java.lang.String,java.io.Serializable> updatePrefetch(DocumentModel docModel)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newDocument

public static DocumentModel newDocument(DocumentModel parent,
                                        java.lang.String type)

newDocument

public static DocumentModel newDocument(DocumentModel parent,
                                        java.lang.String name,
                                        java.lang.String type)

newDocument

public static DocumentModel newDocument(DocumentModel parent,
                                        DocumentType type)

newDocument

public static DocumentModel newDocument(DocumentModel parent,
                                        java.lang.String name,
                                        DocumentType type)

createDocumentModel

public static DocumentModelImpl createDocumentModel(Document doc)
                                             throws DocumentException
Throws:
DocumentException

updatePrefetch

public static java.util.Map<java.lang.String,java.io.Serializable> updatePrefetch(DocumentModel docModel)

createDocumentModel

public static DocumentModelImpl createDocumentModel(Document doc,
                                                    java.lang.String[] schemas)
                                             throws DocumentException
Throws:
DocumentException

createDocumentModel

public static DocumentModelImpl createDocumentModel(DocumentType docType)
                                             throws DocumentException
Creates a new document model using only required information to be used on client side.

Parameters:
docType - The document type
Returns:
the document model initialized thanks to the type definition
Throws:
DocumentException

createDocumentModel

public static DocumentModelImpl createDocumentModel(java.lang.String sessionId,
                                                    DocumentType docType)
                                             throws DocumentException
Creates a new document model using only required information to be used on client side.

Parameters:
sessionId - the CoreSession id
docType - The document type
Returns:
the document model initialized thanks to the type definition
Throws:
DocumentException

createDocumentModel

public static DocumentModelImpl createDocumentModel(java.lang.String parentPath,
                                                    java.lang.String id,
                                                    DocumentType docType,
                                                    java.lang.String[] schemas)
                                             throws DocumentException
Creates a new document model using only required information to be used on client side.

Parameters:
parentPath - the document parent path
id - the document id
docType - the document type
schemas - schemas to take into account when initializing
Returns:
the document model initialized thanks to the type definition
Throws:
DocumentException

exportSchema_OLD

public static DataModel exportSchema_OLD(java.lang.String sid,
                                         DocumentRef docRef,
                                         Document doc,
                                         Schema schema)
                                  throws DocumentException
Throws:
DocumentException

exportSchema

public static DataModel exportSchema(java.lang.String sid,
                                     DocumentRef docRef,
                                     Document doc,
                                     Schema schema)
                              throws DocumentException
Throws:
DocumentException

exportComplexProperty

public static java.util.Map<java.lang.String,java.lang.Object> exportComplexProperty(java.lang.String sid,
                                                                                     DocumentRef docRef,
                                                                                     Property property)
                                                                              throws DocumentException
Throws:
DocumentException

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.