public class CSVImporterWork extends AbstractWork
Work.Progress, Work.State
Modifier and Type | Field and Description |
---|---|
static String |
CATEGORY_CSV_IMPORTER |
static String |
CONTENT_FILED_TYPE_NAME |
Constructor and Description |
---|
CSVImporterWork(CSVImportId id) |
CSVImporterWork(String repositoryName,
String parentPath,
String username,
Blob csvBlob,
CSVImporterOptions options) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
String |
getCategory()
Gets the category for this work.
|
CSVImportId |
getId() |
List<CSVImportLog> |
getImportLogs() |
String |
getTitle()
Gets a human-readable name for this work instance.
|
int |
hashCode() |
static Throwable |
unwrapException(Throwable t) |
void |
work()
This method should implement the actual work done by the
Work
instance. |
afterRun, awaitTermination, beforeRun, cleanUp, getCompletionTime, getData, getDocuments, getPrincipal, getProgress, getSchedulingTime, getStartTime, getState, getStatus, initSession, run, setCanceled, setData, suspend, toString
public static final String CATEGORY_CSV_IMPORTER
public static final String CONTENT_FILED_TYPE_NAME
public CSVImporterWork(CSVImportId id)
public CSVImporterWork(String repositoryName, String parentPath, String username, Blob csvBlob, CSVImporterOptions options)
public CSVImportId getId()
public String getCategory()
Work
Used to choose a thread pool queue.
getCategory
in interface Work
getCategory
in class AbstractWork
null
for the defaultpublic String getTitle()
Work
public List<CSVImportLog> getImportLogs()
public void work() throws Exception
AbstractWork
Work
instance.
It should periodically call #setProgress()
to report its
progress.
To allow for suspension by the WorkManager
, it should
periodically call AbstractWork.isSuspending()
, and if true call
#suspended()
with saved state data and return early.
work
in class AbstractWork
Exception
Copyright © 2013 Nuxeo SA. All Rights Reserved.