Package com.logicaldoc.comparison
Interface DocumentComparator
- All Known Implementing Classes:
AbstractDocumentComparator,BasicComparator,ComparePdfCmdComparator,LiteraComparator,NotAvailableComparator
public interface DocumentComparator
Implementations of this interface are specialized classes that perform
comparison between documents
- Since:
- 8.2.3
- Author:
- Marco Meschieri - LogicalDOC
-
Method Summary
Modifier and TypeMethodDescriptionvoidcompare(String sid, com.logicaldoc.core.document.Version originalVersion, com.logicaldoc.core.document.Version modifiedVersion, File dest) Performs the comparisonvoidPerforms the comparisongetParameter(String name) Gets the value of a parameterImplementations should return the list of the required parameters.Returns the map of parametersbooleanChecks if the comparator is enabled or notvoidReads it's own parameters and stores them in the parameters mapvoidsetEnabled(boolean enabled) Enables or disables the comparator
-
Method Details
-
compare
void compare(String sid, File original, File modified, File dest) throws IOException, com.logicaldoc.core.parser.ParsingException Performs the comparison- Parameters:
sid- identifier of the sessionoriginal- The original filemodified- The modified filedest- The comparison output as PDF file- Throws:
IOException- error writing the temporary files or in the comparisoncom.logicaldoc.core.parser.ParsingException- error in the parsing
-
compare
void compare(String sid, com.logicaldoc.core.document.Version originalVersion, com.logicaldoc.core.document.Version modifiedVersion, File dest) throws IOException, com.logicaldoc.core.PersistenceException, com.logicaldoc.core.parser.ParsingException Performs the comparison- Parameters:
sid- The actual Session IDoriginalVersion- The original versionmodifiedVersion- The modified versiondest- The comparison output as PDF file- Throws:
IOException- error writing the temporary files or in the comparisoncom.logicaldoc.core.PersistenceException- error at database levelcom.logicaldoc.core.parser.ParsingException- error in the parsing
-
getParameterNames
Implementations should return the list of the required parameters. A parameter is stored in the context as comparator.SimpleClassName.parameter = value- Returns:
- the list of configuration parameters
-
getParameters
Returns the map of parameters- Returns:
- map of parameters
-
getParameter
Gets the value of a parameter- Parameters:
name- name of the parameter- Returns:
- 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 comparator is enabled or not- Returns:
- the enabled status
-
setEnabled
void setEnabled(boolean enabled) Enables or disables the comparator- Parameters:
enabled- the new enabled status
-