public class ImporterDocumentCreator extends Object
Constructor and Description |
---|
ImporterDocumentCreator() |
Modifier and Type | Method and Description |
---|---|
static DocumentModel |
importDocument(CoreSession session,
String type,
String id,
String name,
String parentPath,
Properties properties)
Imports a document through core session.Depending on what properties are
received, a proxy or version or normal document is further imported.
|
static DocumentModel |
importProxyDocument(CoreSession session,
String id,
String name,
String parentPath,
Properties properties)
Import a proxy document through the core session.The proxy documents will
have the type ecm:proxy
|
static DocumentModel |
importUsualDocument(CoreSession session,
String type,
String id,
String name,
String parentPath,
Properties properties)
Imports an usual document through core session.
|
static DocumentModel |
importVersionDocument(CoreSession session,
String type,
String id,
String name,
Properties properties)
Import a version document through the core session
|
static boolean |
isProxy(Properties properties)
Looks in properties if it is about a proxy to import.
|
static org.dom4j.Document |
loadXML(File file)
It is the same loadXML method from core IO.
|
public static DocumentModel importDocument(CoreSession session, String type, String id, String name, String parentPath, Properties properties) throws ClientException
session
- - the nuxeo core session used to import the documenttype
- - the type of the document that will be importedid
- - the uuid of the document that will be importedname
- - the name of the document that will be importedparentPath
- - the parent path of the document that will be importedproperties
- - the properties file that will contain the information
needed to proceed properly the importClientException
public static boolean isProxy(Properties properties)
public static org.dom4j.Document loadXML(File file) throws ClientException
ClientException
public static DocumentModel importUsualDocument(CoreSession session, String type, String id, String name, String parentPath, Properties properties) throws ClientException
session
- - the nuxeo core session used to import the documenttype
- - the type of the document that will be importedid
- - the uuid of the document that will be importedname
- - the name of the document that will be importedparentPath
- - the parent path of the document that will be importedproperties
- - the properties file that will contain the information
needed to proceed properly the importClientException
public static DocumentModel importVersionDocument(CoreSession session, String type, String id, String name, Properties properties)
session
- - the nuxeo core session used to import the documenttype
- - the type of the document that will be importedid
- - the uuid of the document that will be importedname
- - the name of the document that will be importedproperties
- - the properties file that will contain the information
needed to proceed properly the importpublic static DocumentModel importProxyDocument(CoreSession session, String id, String name, String parentPath, Properties properties)
session
- - the nuxeo core session used to import the documentid
- - the uuid of the document that will be importedname
- - the name of the document that will be importedparentPath
- - the parent path of the document that will be importedproperties
- - the properties file that will contain the information
needed to proceed properly the importCopyright © 2011 Nuxeo SA. All Rights Reserved.