Package com.logicaldoc.comparison
Class AbstractDocumentComparator
java.lang.Object
com.logicaldoc.comparison.AbstractDocumentComparator
- All Implemented Interfaces:
- DocumentComparator
- Direct Known Subclasses:
- BasicComparator,- ComparePdfCmdComparator,- LiteraComparator,- NotAvailableComparator
Abstract comparator.
- Since:
- 8.2.3
- Author:
- Marco Meschieri - LogicalDOC
- 
Method SummaryModifier and TypeMethodDescriptionfinal voidcompare(String sid, com.logicaldoc.core.document.Version originalVersion, com.logicaldoc.core.document.Version modifiedVersion, File dest) Performs the comparisonfinal voidPerforms the comparisonbooleangetParameter(String name) Gets the value of a parameterImplementations should return the list of the required parameters.Returns the map of parametersinthashCode()booleanChecks 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- 
comparepublic final void compare(String sid, File original, File modified, File target) throws IOException, com.logicaldoc.core.parser.ParsingException Description copied from interface:DocumentComparatorPerforms the comparison- Specified by:
- comparein interface- DocumentComparator
- Parameters:
- sid- identifier of the session
- original- The original file
- modified- The modified file
- target- 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
 
- 
comparepublic final 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 Description copied from interface:DocumentComparatorPerforms the comparison- Specified by:
- comparein interface- DocumentComparator
- 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
 
- 
loadParameterspublic void loadParameters()Description copied from interface:DocumentComparatorReads it's own parameters and stores them in the parameters map- Specified by:
- loadParametersin interface- DocumentComparator
 
- 
isEnabledpublic boolean isEnabled()Description copied from interface:DocumentComparatorChecks if the comparator is enabled or not- Specified by:
- isEnabledin interface- DocumentComparator
- Returns:
- the enabled status
 
- 
setEnabledpublic void setEnabled(boolean enabled) Description copied from interface:DocumentComparatorEnables or disables the comparator- Specified by:
- setEnabledin interface- DocumentComparator
- Parameters:
- enabled- the new enabled status
 
- 
getParametersDescription copied from interface:DocumentComparatorReturns the map of parameters- Specified by:
- getParametersin interface- DocumentComparator
- Returns:
- map of parameters
 
- 
getParameterDescription copied from interface:DocumentComparatorGets the value of a parameter- Specified by:
- getParameterin interface- DocumentComparator
- Parameters:
- name- name of the parameter
- Returns:
- value of the configuration parameter
 
- 
getParameterNamesDescription copied from interface:DocumentComparatorImplementations should return the list of the required parameters. A parameter is stored in the context as comparator.SimpleClassName.parameter = value- Specified by:
- getParameterNamesin interface- DocumentComparator
- Returns:
- the list of configuration parameters
 
- 
hashCodepublic int hashCode()
- 
equals
 
-