public class SpiImporterPreparator extends Object implements ImporterPreparator<ImporterDescription>
ImporterPreparator as services.| Constructor and Description |
|---|
SpiImporterPreparator(ClassLoader serviceClassLoader)
Creates a new instance.
|
SpiImporterPreparator(List<? extends ImporterPreparator<?>> elements)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
<V> ModelOutput<V> |
createOutput(DataModelDefinition<V> definition,
ImporterDescription description,
TestContext context)
Creates a
ModelOutput to prepare the resource which the importer will use. |
Class<ImporterDescription> |
getDescriptionClass()
Returns the class of target
ImporterDescription. |
void |
truncate(ImporterDescription description,
TestContext context)
Truncates all resources which the importer will use.
|
public SpiImporterPreparator(ClassLoader serviceClassLoader)
serviceClassLoader - the class loader to load the registered servicesIllegalArgumentException - if some parameters were nullpublic SpiImporterPreparator(List<? extends ImporterPreparator<?>> elements)
elements - the elements to be compositedIllegalArgumentException - if some parameters were nullpublic Class<ImporterDescription> getDescriptionClass()
ImporterPreparatorImporterDescription.getDescriptionClass in interface ImporterPreparator<ImporterDescription>public void truncate(ImporterDescription description, TestContext context) throws IOException
ImporterPreparatorIf target resources do not support truncate operations, this method has no effects.
truncate in interface ImporterPreparator<ImporterDescription>description - the descriptioncontext - the current test contextIOException - if failed to open the targetpublic <V> ModelOutput<V> createOutput(DataModelDefinition<V> definition, ImporterDescription description, TestContext context) throws IOException
ImporterPreparatorModelOutput to prepare the resource which the importer will use.createOutput in interface ImporterPreparator<ImporterDescription>V - type of modeldefinition - the data model definitiondescription - the descriptioncontext - the current test contextModelOutputIOException - if failed to open the targetCopyright © 2011–2018 Asakusa Framework Team. All rights reserved.