Interface Exporter
- All Known Subinterfaces:
ExporterWithContext
public interface Exporter
Exports retrieved information to several targets, such as data bases, files and indexes. Provides
a default empty method for exporting with context, so that current implementations of this
interface are not broken.
-
Method Summary
Modifier and TypeMethodDescriptionvoidexport(Collection<Document> documents) Exports the documents.default voidexport(Collection<Document> documents, ExporterQueryContext queryContext) Exports the documents, with their relatedExporterQueryContext.getName()voidinit(ParameterStructure parameters) Initializes the exporter and tests whether theServerDataSources the exporter needed for exporting data (if any) is reachable and has been correctly configured.default void
-
Method Details
-
init
void init(ParameterStructure parameters) throws ConfigurationException, ConnectException, InternalErrorException Initializes the exporter and tests whether theServerDataSources the exporter needed for exporting data (if any) is reachable and has been correctly configured.- Parameters:
parameters- parameters to initialize the exporter.- Throws:
ConfigurationException- if the configuration information required by the exporter is malformed or missing.ConnectException- if a connection error occurs. Typically, the connection to aServerDataSourcewas refused remotely.InternalErrorException- if a severe error occurs.
-
getName
String getName() -
export
Exports the documents.- Parameters:
documents- Collection ofDocuments- Throws:
ExporterException
-
export
default void export(Collection<Document> documents, ExporterQueryContext queryContext) throws ExporterException Exports the documents, with their relatedExporterQueryContext.- Parameters:
documents- Collection ofDocuments to exportqueryContext- Context with the query and its parameters that originated thoseDocuments to export- Throws:
ExporterException
-
interrupt
- Throws:
ExporterException
-