Class GenericThreadedImportTask
- java.lang.Object
-
- org.nuxeo.ecm.platform.importer.base.GenericThreadedImportTask
-
-
Field Summary
Fields Modifier and Type Field Description protected intbatchSizestatic StringDOC_IMPORTED_EVENTprotected ImporterDocumentModelFactoryfactoryprotected List<ImportingDocumentFilter>importingDocumentFiltersprotected BooleanisRootTaskprotected booleanisRunningprotected StringjobNameprotected List<ImporterListener>listenersprotected StringrepositoryNameprotected DocumentModelrootDocprotected SourceNoderootSourceprotected ImporterLoggerrsLoggerprotected CoreSessionsessionprotected BooleanskipContainerCreationprotected static inttaskCounterprotected StringtaskIdprotected ImporterThreadingPolicythreadPolicyprotected inttransactionTimeoutstatic intTX_TIMEOUTprotected longuploadedFilesprotected longuploadedKO
-
Constructor Summary
Constructors Modifier Constructor Description GenericThreadedImportTask(String repositoryName, SourceNode rootSource, DocumentModel rootDoc, boolean skipContainerCreation, ImporterLogger rsLogger, int batchSize, ImporterDocumentModelFactory factory, ImporterThreadingPolicy threadPolicy, String jobName)protectedGenericThreadedImportTask(CoreSession session)protectedGenericThreadedImportTask(CoreSession session, SourceNode rootSource, DocumentModel rootDoc, boolean skipContainerCreation, ImporterLogger rsLogger, int batchSize, ImporterDocumentModelFactory factory, ImporterThreadingPolicy threadPolicy)
-
Method Summary
-
-
-
Field Detail
-
DOC_IMPORTED_EVENT
public static final String DOC_IMPORTED_EVENT
- See Also:
- Constant Field Values
-
taskCounter
protected static int taskCounter
-
isRunning
protected boolean isRunning
-
uploadedFiles
protected long uploadedFiles
-
uploadedKO
protected long uploadedKO
-
batchSize
protected int batchSize
-
session
protected CoreSession session
-
rootDoc
protected DocumentModel rootDoc
-
rootSource
protected SourceNode rootSource
-
skipContainerCreation
protected Boolean skipContainerCreation
-
isRootTask
protected Boolean isRootTask
-
taskId
protected String taskId
-
TX_TIMEOUT
public static final int TX_TIMEOUT
- See Also:
- Constant Field Values
-
transactionTimeout
protected int transactionTimeout
-
threadPolicy
protected ImporterThreadingPolicy threadPolicy
-
factory
protected ImporterDocumentModelFactory factory
-
jobName
protected String jobName
-
listeners
protected List<ImporterListener> listeners
-
importingDocumentFilters
protected List<ImportingDocumentFilter> importingDocumentFilters
-
repositoryName
protected String repositoryName
-
rsLogger
protected ImporterLogger rsLogger
-
-
Constructor Detail
-
GenericThreadedImportTask
protected GenericThreadedImportTask(CoreSession session)
-
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 Detail
-
getCoreSession
protected CoreSession getCoreSession()
-
commit
protected void commit()
-
commit
protected void commit(boolean force)
-
doCreateFolderishNode
protected DocumentModel doCreateFolderishNode(DocumentModel parent, SourceNode node)
-
doCreateLeafNode
protected DocumentModel doCreateLeafNode(DocumentModel parent, SourceNode node) throws IOException
- Throws:
IOException
-
shouldImportDocument
protected boolean shouldImportDocument(SourceNode node)
-
createNewTask
protected GenericThreadedImportTask createNewTask(DocumentModel parent, SourceNode node, ImporterLogger log, Integer batchSize)
-
createNewTaskIfNeeded
protected GenericThreadedImportTask createNewTaskIfNeeded(DocumentModel parent, SourceNode node)
-
recursiveCreateDocumentFromNode
protected void recursiveCreateDocumentFromNode(DocumentModel parent, SourceNode node) throws IOException
- Throws:
IOException
-
setInputSource
public void setInputSource(SourceNode node)
-
setTargetFolder
public void setTargetFolder(DocumentModel rootDoc)
-
isRunning
public boolean isRunning()
-
fslog
protected void fslog(String msg, boolean debug)
-
getBatchSize
public int getBatchSize()
-
setBatchSize
public void setBatchSize(int batchSize)
-
setSkipContainerCreation
public void setSkipContainerCreation(Boolean skipContainerCreation)
-
setRootTask
public void setRootTask()
-
getThreadPolicy
protected ImporterThreadingPolicy getThreadPolicy()
-
getFactory
protected ImporterDocumentModelFactory getFactory()
-
addImportingDocumentFilters
public void addImportingDocumentFilters(ImportingDocumentFilter... importingDocumentFilters)
-
addImportingDocumentFilters
public void addImportingDocumentFilters(Collection<ImportingDocumentFilter> importingDocumentFilters)
-
addListeners
public void addListeners(ImporterListener... listeners)
-
addListeners
public void addListeners(Collection<ImporterListener> listeners)
-
setTransactionTimeout
public void setTransactionTimeout(int transactionTimeout)
-
notifyImportError
protected void notifyImportError()
-
setRootDoc
protected void setRootDoc(DocumentModel rootDoc)
-
setRootSource
protected void setRootSource(SourceNode rootSource)
-
setFactory
protected void setFactory(ImporterDocumentModelFactory factory)
-
setRsLogger
protected void setRsLogger(ImporterLogger rsLogger)
-
setThreadPolicy
protected void setThreadPolicy(ImporterThreadingPolicy threadPolicy)
-
setJobName
protected void setJobName(String jobName)
-
-