public class GenericThreadedImportTask extends Object implements Runnable
Modifier and Type | Field and Description |
---|---|
protected int |
batchSize |
static String |
DOC_IMPORTED_EVENT |
protected ImporterDocumentModelFactory |
factory |
protected List<ImportingDocumentFilter> |
importingDocumentFilters |
protected Boolean |
isRootTask |
protected boolean |
isRunning |
protected String |
jobName |
protected List<ImporterListener> |
listeners |
protected String |
repositoryName |
protected DocumentModel |
rootDoc |
protected SourceNode |
rootSource |
protected ImporterLogger |
rsLogger |
protected CoreSession |
session |
protected Boolean |
skipContainerCreation |
protected static int |
taskCounter |
protected String |
taskId |
protected ImporterThreadingPolicy |
threadPolicy |
protected int |
transactionTimeout |
static int |
TX_TIMEOUT |
protected long |
uploadedFiles |
protected long |
uploadedKO |
Modifier | Constructor and Description |
---|---|
protected |
GenericThreadedImportTask(CoreSession session) |
protected |
GenericThreadedImportTask(CoreSession session,
SourceNode rootSource,
DocumentModel rootDoc,
boolean skipContainerCreation,
ImporterLogger rsLogger,
int batchSize,
ImporterDocumentModelFactory factory,
ImporterThreadingPolicy threadPolicy) |
|
GenericThreadedImportTask(String repositoryName,
SourceNode rootSource,
DocumentModel rootDoc,
boolean skipContainerCreation,
ImporterLogger rsLogger,
int batchSize,
ImporterDocumentModelFactory factory,
ImporterThreadingPolicy threadPolicy,
String jobName) |
public static final String DOC_IMPORTED_EVENT
protected static int taskCounter
protected boolean isRunning
protected long uploadedFiles
protected long uploadedKO
protected int batchSize
protected CoreSession session
protected DocumentModel rootDoc
protected SourceNode rootSource
protected Boolean skipContainerCreation
protected Boolean isRootTask
public static final int TX_TIMEOUT
protected int transactionTimeout
protected ImporterThreadingPolicy threadPolicy
protected ImporterDocumentModelFactory factory
protected List<ImporterListener> listeners
protected List<ImportingDocumentFilter> importingDocumentFilters
protected String repositoryName
protected ImporterLogger rsLogger
protected GenericThreadedImportTask(CoreSession session)
protected GenericThreadedImportTask(CoreSession session, SourceNode rootSource, DocumentModel rootDoc, boolean skipContainerCreation, ImporterLogger rsLogger, int batchSize, ImporterDocumentModelFactory factory, ImporterThreadingPolicy threadPolicy)
public GenericThreadedImportTask(String repositoryName, SourceNode rootSource, DocumentModel rootDoc, boolean skipContainerCreation, ImporterLogger rsLogger, int batchSize, ImporterDocumentModelFactory factory, ImporterThreadingPolicy threadPolicy, String jobName)
protected CoreSession getCoreSession()
protected void commit()
protected void commit(boolean force)
protected DocumentModel doCreateFolderishNode(DocumentModel parent, SourceNode node)
protected DocumentModel doCreateLeafNode(DocumentModel parent, SourceNode node) throws IOException
IOException
protected boolean shouldImportDocument(SourceNode node)
protected GenericThreadedImportTask createNewTask(DocumentModel parent, SourceNode node, ImporterLogger log, Integer batchSize)
protected GenericThreadedImportTask createNewTaskIfNeeded(DocumentModel parent, SourceNode node)
protected void recursiveCreateDocumentFromNode(DocumentModel parent, SourceNode node) throws IOException
IOException
public void setInputSource(SourceNode node)
public void setTargetFolder(DocumentModel rootDoc)
public boolean isRunning()
public int getBatchSize()
public void setBatchSize(int batchSize)
public void setSkipContainerCreation(Boolean skipContainerCreation)
public void setRootTask()
protected ImporterThreadingPolicy getThreadPolicy()
protected ImporterDocumentModelFactory getFactory()
public void addImportingDocumentFilters(ImportingDocumentFilter... importingDocumentFilters)
public void addImportingDocumentFilters(Collection<ImportingDocumentFilter> importingDocumentFilters)
public void addListeners(ImporterListener... listeners)
public void addListeners(Collection<ImporterListener> listeners)
public void setTransactionTimeout(int transactionTimeout)
protected void notifyImportError()
protected void setRootDoc(DocumentModel rootDoc)
protected void setRootSource(SourceNode rootSource)
protected void setFactory(ImporterDocumentModelFactory factory)
protected void setRsLogger(ImporterLogger rsLogger)
protected void setThreadPolicy(ImporterThreadingPolicy threadPolicy)
protected void setJobName(String jobName)
Copyright © 2017 Nuxeo. All rights reserved.