|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.esdihumboldt.hale.common.core.io.impl.AbstractIOProvider
public abstract class AbstractIOProvider
Abstract base class for implementing IOProvider
s
Field Summary |
---|
Fields inherited from interface eu.esdihumboldt.hale.common.core.io.IOProvider |
---|
PARAM_CONTENT_TYPE |
Constructor Summary | |
---|---|
protected |
AbstractIOProvider()
Default constructor |
Method Summary | |
---|---|
protected void |
addSupportedParameter(String name)
Add a supported parameter name, should be called in the constructor |
IOReport |
execute(ProgressIndicator progress)
Execute the I/O provider. |
protected abstract IOReport |
execute(ProgressIndicator progress,
IOReporter reporter)
Execute the I/O provider. |
protected void |
fail(String message)
Fail validation or execution if the configuration is not valid |
org.eclipse.core.runtime.content.IContentType |
getContentType()
Get the content type |
protected abstract String |
getDefaultTypeName()
Get the default type name if no content type is provided |
String |
getParameter(String name)
Get the value for the given parameter name |
Set<String> |
getSupportedParameters()
Get the supported configuration parameters. |
protected String |
getTypeName()
Get the content type name. |
void |
loadConfiguration(Map<String,String> configuration)
Uses setParameter(String, String) to load the configuration. |
void |
setContentType(org.eclipse.core.runtime.content.IContentType contentType)
Set the content type. |
void |
setParameter(String name,
String value)
Set a parameter |
void |
storeConfiguration(Map<String,String> configuration)
Stores all parameters that were set using setParameter(String, String) in the configuration. |
void |
validate()
Validate the I/O provider configuration |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface eu.esdihumboldt.hale.common.core.io.IOProvider |
---|
createReporter, isCancelable |
Constructor Detail |
---|
protected AbstractIOProvider()
Method Detail |
---|
public IOReport execute(ProgressIndicator progress) throws IOProviderConfigurationException, IOException
IOProvider
execute
in interface IOProvider
progress
- the progress indicator, may be null
IOProviderConfigurationException
- if the I/O provider was not
configured properly
IOException
- if an I/O operation failsIOProvider.execute(ProgressIndicator)
protected abstract IOReport execute(ProgressIndicator progress, IOReporter reporter) throws IOProviderConfigurationException, IOException
progress
- the progress indicatorreporter
- the reporter to use for the execution report
IOProviderConfigurationException
- if the I/O provider was not
configured properly
IOException
- if an I/O operation failsprotected String getTypeName()
protected abstract String getDefaultTypeName()
public void validate() throws IOProviderConfigurationException
IOProvider
validate
in interface IOProvider
IOProviderConfigurationException
- if the I/O provider was not
configured properlyIOProvider.validate()
public final void loadConfiguration(Map<String,String> configuration)
setParameter(String, String)
to load the configuration. For
changing the behavior please override
setParameter(String, String)
loadConfiguration
in interface IOProvider
configuration
- the configuration to loadIOProvider.loadConfiguration(Map)
public void storeConfiguration(Map<String,String> configuration)
setParameter(String, String)
in the configuration. For changing
the behavior please override this method.
storeConfiguration
in interface IOProvider
configuration
- the configuration to populateIOProvider.storeConfiguration(Map)
protected void fail(String message) throws IOProviderConfigurationException
message
- the error message
IOProviderConfigurationException
- alwaysprotected void addSupportedParameter(String name)
name
- the supported parameter name to addpublic String getParameter(String name)
IOProvider
getParameter
in interface IOProvider
name
- the parameter name
null
IOProvider.getParameter(String)
public Set<String> getSupportedParameters()
IOProvider
getSupportedParameters
in interface IOProvider
IOProvider.getSupportedParameters()
public void setParameter(String name, String value)
IOProvider
setParameter
in interface IOProvider
name
- the parameter namevalue
- the parameter valueIOProvider.setParameter(String, String)
public org.eclipse.core.runtime.content.IContentType getContentType()
IOProvider
getContentType
in interface IOProvider
null
IOProvider.getContentType()
public void setContentType(org.eclipse.core.runtime.content.IContentType contentType)
IOProvider
setContentType
in interface IOProvider
contentType
- the content typeIOProvider.setContentType(IContentType)
|
Humboldt Alignment Editor 2.5.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |