Package com.logicaldoc.core.conversion
Interface FormatConverter
- All Known Implementing Classes:
AbstractFormatConverter
,CompressedArchiveConverter
,GhostscriptConverter
,ImageConverter
,NoConversionConverter
,NotAvailableConverter
,P7MConverter
,PstConverter
,RarConverter
,SevenZipConverter
,TarConverter
,XMLConverter
,ZipConverter
public interface FormatConverter
Implementations of this interface are specialized classes that perform
conversion from a source format to a target format.
- Since:
- 7.1.3
- Author:
- Marco Meschieri - LogicalDOC
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Performs the conversionvoid
Performs the conversiongetParameter
(String name) Gets the value of a parameterImplementations should return the list of the required parameters.Returns the map of parametersboolean
Checks if the converter is enabled or notvoid
Reads it's own parameters and stores them in the parameters mapvoid
setEnabled
(boolean enabled) Enables or disables the converter
-
Method Details
-
convert
Performs the conversion- Parameters:
src
- The source filedest
- The converted file, the extension of it's filename defines the output format- Throws:
IOException
- raised if the conversion resulted in an error
-
convert
Performs the conversion- Parameters:
sid
- The actual Session ID (optional)document
- The document (optional)src
- The source filedest
- The converted file, the extension of it's filename defines the output format- Throws:
IOException
- raised if the conversion resulted in an error
-
getParameterNames
Implementations should return the list of the required parameters. A parameter is stored in the context as converter.SimpleClassName.parameter = value- Returns:
- list of the configuration parameters
-
getParameters
Returns the map of parameters- Returns:
- map param_name = param_value
-
getParameter
Gets the value of a parameter- Parameters:
name
- name of the configuration parameter- Returns:
- the value of the configuration parameter
-
loadParameters
void loadParameters()Reads it's own parameters and stores them in the parameters map -
isEnabled
boolean isEnabled()Checks if the converter is enabled or not- Returns:
- if the converter is enabled
-
setEnabled
void setEnabled(boolean enabled) Enables or disables the converter- Parameters:
enabled
- the enabled flag
-