public class BasicImportService extends Object implements ImportService
Constructor and Description |
---|
BasicImportService() |
Modifier and Type | Method and Description |
---|---|
void |
doImportItems(Collection<Importable> importables,
String siteId)
Put the parsed items into a site.
|
boolean |
isValidArchive(ResetOnCloseInputStream archiveFileData)
Check the validity of the file data passed.
|
ImportDataSource |
parseFromFile(ResetOnCloseInputStream archiveFileData)
Parse the archive file data and create an Import Data Source object containing the results.
|
void |
registerParser(ImportFileParser parser) |
void |
registerResourceHandler(HandlesImportable handler) |
void |
setParsers(List<ImportFileParser> parsers) |
void |
setResourceHandlers(List<HandlesImportable> resourceHandlers) |
public void doImportItems(Collection<Importable> importables, String siteId)
ImportService
doImportItems
in interface ImportService
importables
- a collection of importable things to import.siteId
- is the the id of the site to import to.public boolean isValidArchive(ResetOnCloseInputStream archiveFileData)
ImportService
isValidArchive
in interface ImportService
archiveFileData
- is an input stream of data gathered from an archive file or package.ResetOnCloseInputStream
public ImportDataSource parseFromFile(ResetOnCloseInputStream archiveFileData)
ImportService
parseFromFile
in interface ImportService
archiveFileData
- is an input stream of data gathered from an archive file or package.ResetOnCloseInputStream
public void registerParser(ImportFileParser parser)
public void setParsers(List<ImportFileParser> parsers)
public void registerResourceHandler(HandlesImportable handler)
public void setResourceHandlers(List<HandlesImportable> resourceHandlers)
Copyright © 2003–2019 The Sakai Foundation. All rights reserved.