public abstract class AbstractImportProvider extends AbstractIOProvider implements ImportProvider
ImportProvider
implementationPARAM_RESOURCE_ID, PARAM_SOURCE
PARAM_CHARSET, PARAM_CONTENT_TYPE
Constructor and Description |
---|
AbstractImportProvider()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
IOReporter |
createReporter()
Create a reporter configured for the execution of this I/O provider.
|
IOReport |
execute(ProgressIndicator progress)
Execute the I/O provider.
|
protected String |
generateResourceId()
Generate the unique resource identifier.
|
String |
getResourceIdentifier()
Get the resource identifier.
|
LocatableInputSupplier<? extends InputStream> |
getSource()
Get the import source
|
void |
setParameter(String name,
Value value)
Set a parameter
|
void |
setSource(LocatableInputSupplier<? extends InputStream> source)
Set the import source
|
void |
storeConfiguration(Map<String,Value> configuration)
Stores all parameters that were set using
AbstractIOProvider.setParameter(String, Value) in the configuration. |
void |
validate()
Validate the I/O provider configuration
|
addSupportedParameter, execute, fail, getCharset, getContentType, getDefaultCharset, getDefaultTypeName, getParameter, getSupportedParameters, getTypeName, loadConfiguration, setCharset, setContentType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getCharset, getContentType, getParameter, getSupportedParameters, isCancelable, loadConfiguration, setCharset, setContentType
public IOReport execute(ProgressIndicator progress) throws IOProviderConfigurationException, IOException
IOProvider
execute
in interface IOProvider
execute
in class AbstractIOProvider
progress
- the progress indicator, may be null
IOProviderConfigurationException
- if the I/O provider was not
configured properlyIOException
- if an I/O operation failsAbstractIOProvider.execute(ProgressIndicator)
protected String generateResourceId()
public void setSource(LocatableInputSupplier<? extends InputStream> source)
ImportProvider
setSource
in interface ImportProvider
source
- the source input supplierImportProvider.setSource(LocatableInputSupplier)
public LocatableInputSupplier<? extends InputStream> getSource()
ImportProvider
getSource
in interface ImportProvider
ImportProvider.getSource()
public void validate() throws IOProviderConfigurationException
IOProvider
validate
in interface IOProvider
validate
in class AbstractIOProvider
IOProviderConfigurationException
- if the I/O provider was not
configured properlyAbstractIOProvider.validate()
public void storeConfiguration(Map<String,Value> configuration)
AbstractIOProvider
AbstractIOProvider.setParameter(String, Value)
in the configuration. For changing
the behavior please override this method.storeConfiguration
in interface IOProvider
storeConfiguration
in class AbstractIOProvider
configuration
- the configuration to populate, values are either
strings, DOM elements or complex value types defined in the
ComplexValueExtension
AbstractIOProvider.storeConfiguration(Map)
public void setParameter(String name, Value value)
IOProvider
setParameter
in interface IOProvider
setParameter
in class AbstractIOProvider
name
- the parameter namevalue
- the parameter value, it is either a string, a DOM elements
or a complex value types defined in the
ComplexValueExtension
public IOReporter createReporter()
IOProvider
IOProvider.execute(ProgressIndicator)
.createReporter
in interface IOProvider
IOProvider.createReporter()
public String getResourceIdentifier()
ImportProvider
getResourceIdentifier
in interface ImportProvider
null
if the provider
was not executed yetImportProvider.getResourceIdentifier()
Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a