public final class ImportManager extends Object
Modifier and Type | Method and Description |
---|---|
static void |
doProcessAsynchronousImport(IImportSource importSource,
String strTableName,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
Locale locale,
boolean bUpdateExistingRows,
boolean bStopOnErrors,
boolean bEmptyTable,
fr.paris.lutece.portal.business.user.AdminUser admin)
Do process an asynchronous import of data from an import source to a
given table in the database.
|
static ImportResult |
doProcessImport(IImportSource importSource,
String strTableName,
boolean bUpdateExistingRows,
boolean bStopOnErrors,
boolean bEmptyTable,
fr.paris.lutece.portal.service.plugin.Plugin plugin,
Locale locale)
Do process the import of data from an import source to a given table in
the database.
|
static ImportResult |
getAsynchronousImportResult(int nAdminId)
Get the result of an asynchronous import.
|
static IImportSource |
getImportSource(File file)
Get an import source for a file.
|
static IImportSource |
getImportSource(org.apache.commons.fileupload.FileItem fileItem)
Get an import source for a file item.
|
static boolean |
hasImportInProcess(int nAdminId)
Check if an admin user has an import processing
|
static void |
registerImportSourceFactory(IImportSourceFactory importSourceFactory)
Register an import source factory
|
public static void registerImportSourceFactory(IImportSourceFactory importSourceFactory)
importSourceFactory
- The import source factory to registerpublic static IImportSource getImportSource(org.apache.commons.fileupload.FileItem fileItem)
fileItem
- The file item to read data frompublic static IImportSource getImportSource(File file)
file
- The file to read data frompublic static ImportResult doProcessImport(IImportSource importSource, String strTableName, boolean bUpdateExistingRows, boolean bStopOnErrors, boolean bEmptyTable, fr.paris.lutece.portal.service.plugin.Plugin plugin, Locale locale)
importSource
- The import source to get data fromstrTableName
- The name of the table in the database to import data
tobUpdateExistingRows
- True to update existing rows, false to ignore
thembStopOnErrors
- True to stop when an error occurred, false to skip
the item and continuebEmptyTable
- True to empty the table before importing data, false
otherwiseplugin
- The plugin to get the pool fromlocale
- The localepublic static void doProcessAsynchronousImport(IImportSource importSource, String strTableName, fr.paris.lutece.portal.service.plugin.Plugin plugin, Locale locale, boolean bUpdateExistingRows, boolean bStopOnErrors, boolean bEmptyTable, fr.paris.lutece.portal.business.user.AdminUser admin)
importSource
- The import source to get data fromstrTableName
- The name of the table in the database to import data
toplugin
- The plugin to get the pool fromlocale
- The localebUpdateExistingRows
- True to update existing rows, false to ignore
thembStopOnErrors
- True to stop when an error occurred, false to skip
the item and continuebEmptyTable
- True to empty the table before importing data, false
otherwiseadmin
- The admin user that started the import, or null if the
import was started by a daemonpublic static boolean hasImportInProcess(int nAdminId)
nAdminId
- The id of the admin userpublic static ImportResult getAsynchronousImportResult(int nAdminId)
nAdminId
- The id of the user that started the importCopyright © 2018 City of Paris. All rights reserved.