public class ModelImporter extends Object
The association between template and document is translated during the IO import (because UUIDs change).
Modifier and Type | Field and Description |
---|---|
protected static String |
DOMAIN_QUERY |
static String |
EXAMPLE_ROOT |
protected static org.apache.commons.logging.Log |
log |
protected static String |
RAW_RESOURCES_ROOT |
protected static String |
RESOURCES_ROOT |
protected CoreSession |
session |
static String |
TEMPLATE_ROOT |
static String |
TEST_EXAMPLE_ROOT |
static String |
TEST_TEMPLATE_ROOT |
Constructor and Description |
---|
ModelImporter(CoreSession session) |
Modifier and Type | Method and Description |
---|---|
protected DocumentModel |
getOrCreateSampleContainer() |
protected DocumentModel |
getOrCreateTemplateContainer() |
protected String |
getRawTemplateResourcesRootPath() |
protected DocumentModel |
getTargetDomain() |
protected DocumentModel |
getTargetDomain(boolean canRetry) |
protected String |
getTemplateResourcesRootPath() |
protected DocumentModel |
getWSRoot(DocumentModel rootDomain) |
protected DocumentRef |
importModel(String modelName,
File source,
DocumentModel root) |
int |
importModelAndExamples(File root) |
int |
importModels() |
protected int |
importSamples(File root,
DocumentRef modelRef,
DocumentModel rootDoc) |
protected boolean |
isImportAlreadyDone() |
protected void |
markImportDone() |
protected static final org.apache.commons.logging.Log log
public static final String EXAMPLE_ROOT
public static final String TEST_EXAMPLE_ROOT
public static final String TEMPLATE_ROOT
public static final String TEST_TEMPLATE_ROOT
protected static final String RESOURCES_ROOT
protected static final String RAW_RESOURCES_ROOT
protected static final String DOMAIN_QUERY
protected final CoreSession session
public ModelImporter(CoreSession session)
protected String getTemplateResourcesRootPath()
protected String getRawTemplateResourcesRootPath()
protected DocumentModel getTargetDomain()
protected DocumentModel getTargetDomain(boolean canRetry)
protected DocumentModel getOrCreateTemplateContainer()
protected DocumentModel getWSRoot(DocumentModel rootDomain)
protected DocumentModel getOrCreateSampleContainer()
protected boolean isImportAlreadyDone()
protected void markImportDone()
public int importModels()
public int importModelAndExamples(File root) throws IOException
IOException
protected DocumentRef importModel(String modelName, File source, DocumentModel root) throws IOException
IOException
protected int importSamples(File root, DocumentRef modelRef, DocumentModel rootDoc) throws IOException
IOException
Copyright © 2018 Nuxeo. All rights reserved.