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 SummaryModifier 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- 
comparevoid compare(String sid, File original, File modified, File dest) throws IOException, com.logicaldoc.core.parser.ParsingException Performs the comparison- Parameters:
- sid- identifier of the session
- original- The original file
- modified- The modified file
- dest- The comparison output as PDF file
- Throws:
- IOException- error writing the temporary files or in the comparison
- com.logicaldoc.core.parser.ParsingException- error in the parsing
 
- 
comparevoid 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 ID
- originalVersion- The original version
- modifiedVersion- The modified version
- dest- The comparison output as PDF file
- Throws:
- IOException- error writing the temporary files or in the comparison
- com.logicaldoc.core.PersistenceException- error at database level
- com.logicaldoc.core.parser.ParsingException- error in the parsing
 
- 
getParameterNamesImplementations 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
 
- 
getParametersReturns the map of parameters- Returns:
- map of parameters
 
- 
getParameterGets the value of a parameter- Parameters:
- name- name of the parameter
- Returns:
- value of the configuration parameter
 
- 
loadParametersvoid loadParameters()Reads it's own parameters and stores them in the parameters map
- 
isEnabledboolean isEnabled()Checks if the comparator is enabled or not- Returns:
- the enabled status
 
- 
setEnabledvoid setEnabled(boolean enabled) Enables or disables the comparator- Parameters:
- enabled- the new enabled status
 
 
-