T
- type of target ImporterDescription
public interface ImporterPreparator<T extends ImporterDescription>
ImporterDescription
.
Attention:
Currently this interface is not stable.
Please inherit AbstractImporterPreparator
or BaseImporterPreparator
instead.
Adding ImporterDescription
test moderators, clients can implement this
and put the class name in
META-INF/services/com.asakusafw.testdriver.core.ImporterPreparator
.
AbstractImporterPreparator
Modifier and Type | Method and Description |
---|---|
<V> ModelOutput<V> |
createOutput(DataModelDefinition<V> definition,
T description,
TestContext context)
Creates a
ModelOutput to prepare the resource which the importer will use. |
Class<T> |
getDescriptionClass()
Returns the class of target
ImporterDescription . |
void |
truncate(T description,
TestContext context)
Truncates all resources which the importer will use.
|
Class<T> getDescriptionClass()
ImporterDescription
.void truncate(T description, TestContext context) throws IOException
If target resources do not support truncate operations, this method has no effects.
description
- the descriptioncontext
- the current test contextIOException
- if failed to open the target<V> ModelOutput<V> createOutput(DataModelDefinition<V> definition, T description, TestContext context) throws IOException
ModelOutput
to prepare the resource which the importer will use.V
- type of modeldefinition
- the data model definitiondescription
- the descriptioncontext
- the current test contextModelOutput
IOException
- if failed to open the targetCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.