Class GenericThreadedImportTask
java.lang.Object
org.nuxeo.ecm.platform.importer.base.GenericThreadedImportTask
- All Implemented Interfaces:
Runnable
Generic importer task
- Author:
- Thierry Delprat
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
static final String
protected ImporterDocumentModelFactory
protected List<ImportingDocumentFilter>
protected Boolean
protected boolean
protected String
protected List<ImporterListener>
protected String
protected DocumentModel
protected SourceNode
protected ImporterLogger
protected CoreSession
protected Boolean
protected static int
protected String
protected ImporterThreadingPolicy
protected int
static final int
protected long
protected long
-
Constructor Summary
ModifierConstructorDescriptionGenericThreadedImportTask
(String repositoryName, SourceNode rootSource, DocumentModel rootDoc, boolean skipContainerCreation, ImporterLogger rsLogger, int batchSize, ImporterDocumentModelFactory factory, ImporterThreadingPolicy threadPolicy, String jobName) protected
GenericThreadedImportTask
(CoreSession session) protected
GenericThreadedImportTask
(CoreSession session, SourceNode rootSource, DocumentModel rootDoc, boolean skipContainerCreation, ImporterLogger rsLogger, int batchSize, ImporterDocumentModelFactory factory, ImporterThreadingPolicy threadPolicy) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addImportingDocumentFilters
(Collection<ImportingDocumentFilter> importingDocumentFilters) void
addImportingDocumentFilters
(ImportingDocumentFilter... importingDocumentFilters) void
addListeners
(Collection<ImporterListener> listeners) void
addListeners
(ImporterListener... listeners) protected void
commit()
protected void
commit
(boolean force) protected GenericThreadedImportTask
createNewTask
(DocumentModel parent, SourceNode node, ImporterLogger log, Integer batchSize) protected GenericThreadedImportTask
createNewTaskIfNeeded
(DocumentModel parent, SourceNode node) protected DocumentModel
doCreateFolderishNode
(DocumentModel parent, SourceNode node) protected DocumentModel
doCreateLeafNode
(DocumentModel parent, SourceNode node) protected void
int
protected CoreSession
protected ImporterDocumentModelFactory
protected ImporterThreadingPolicy
boolean
protected void
protected void
recursiveCreateDocumentFromNode
(DocumentModel parent, SourceNode node) void
run()
void
setBatchSize
(int batchSize) protected void
setFactory
(ImporterDocumentModelFactory factory) void
setInputSource
(SourceNode node) protected void
setJobName
(String jobName) protected void
setRootDoc
(DocumentModel rootDoc) protected void
setRootSource
(SourceNode rootSource) void
protected void
setRsLogger
(ImporterLogger rsLogger) void
setSkipContainerCreation
(Boolean skipContainerCreation) void
setTargetFolder
(DocumentModel rootDoc) protected void
setThreadPolicy
(ImporterThreadingPolicy threadPolicy) void
setTransactionTimeout
(int transactionTimeout) protected boolean
-
Field Details
-
DOC_IMPORTED_EVENT
- See Also:
-
taskCounter
protected static int taskCounter -
isRunning
protected boolean isRunning -
uploadedFiles
protected long uploadedFiles -
uploadedKO
protected long uploadedKO -
batchSize
protected int batchSize -
session
-
rootDoc
-
rootSource
-
skipContainerCreation
-
isRootTask
-
taskId
-
TX_TIMEOUT
public static final int TX_TIMEOUT- See Also:
-
transactionTimeout
protected int transactionTimeout -
threadPolicy
-
factory
-
jobName
-
listeners
-
importingDocumentFilters
-
repositoryName
-
rsLogger
-
-
Constructor Details
-
GenericThreadedImportTask
-
GenericThreadedImportTask
protected GenericThreadedImportTask(CoreSession session, SourceNode rootSource, DocumentModel rootDoc, boolean skipContainerCreation, ImporterLogger rsLogger, int batchSize, ImporterDocumentModelFactory factory, ImporterThreadingPolicy threadPolicy) -
GenericThreadedImportTask
public GenericThreadedImportTask(String repositoryName, SourceNode rootSource, DocumentModel rootDoc, boolean skipContainerCreation, ImporterLogger rsLogger, int batchSize, ImporterDocumentModelFactory factory, ImporterThreadingPolicy threadPolicy, String jobName)
-
-
Method Details
-
getCoreSession
-
commit
protected void commit() -
commit
protected void commit(boolean force) -
doCreateFolderishNode
-
doCreateLeafNode
- Throws:
IOException
-
shouldImportDocument
-
createNewTask
protected GenericThreadedImportTask createNewTask(DocumentModel parent, SourceNode node, ImporterLogger log, Integer batchSize) -
createNewTaskIfNeeded
-
recursiveCreateDocumentFromNode
protected void recursiveCreateDocumentFromNode(DocumentModel parent, SourceNode node) throws IOException - Throws:
IOException
-
setInputSource
-
setTargetFolder
-
isRunning
public boolean isRunning() -
run
public void run() -
fslog
-
getBatchSize
public int getBatchSize() -
setBatchSize
public void setBatchSize(int batchSize) -
setSkipContainerCreation
-
setRootTask
public void setRootTask() -
getThreadPolicy
-
getFactory
-
addImportingDocumentFilters
-
addImportingDocumentFilters
public void addImportingDocumentFilters(Collection<ImportingDocumentFilter> importingDocumentFilters) -
addListeners
-
addListeners
-
setTransactionTimeout
public void setTransactionTimeout(int transactionTimeout) -
notifyImportError
protected void notifyImportError() -
setRootDoc
-
setRootSource
-
setFactory
-
setRsLogger
-
setThreadPolicy
-
setJobName
-