Package com.logicaldoc.comparison
Interface DocumentComparator
-
- All Known Implementing Classes:
AbstractDocumentComparator
,BasicComparator
,NotAvailableComparator
,WorkShareComparator
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
compare(String sid, com.logicaldoc.core.document.Version originalVersion, com.logicaldoc.core.document.Version modifiedVersion, File dest)
Performs the comparisonvoid
compare(String sid, File original, File modified, File dest)
Performs the comparisonString
getParameter(String name)
Gets the value of a parameterList<String>
getParameterNames()
Implementations should return the list of the required parameters.Map<String,String>
getParameters()
Returns the map of parametersboolean
isEnabled()
Checks if the comparator is enabled or notvoid
loadParameters()
Reads it's own parameters and stores them in the parameters mapvoid
setEnabled(boolean enabled)
Enables or disables the comparator
-
-
-
Method Detail
-
compare
void compare(String sid, File original, File modified, File dest) throws IOException
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 comparation
-
compare
void compare(String sid, com.logicaldoc.core.document.Version originalVersion, com.logicaldoc.core.document.Version modifiedVersion, File dest) throws IOException
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 comparation
-
getParameterNames
List<String> 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
Map<String,String> getParameters()
Returns the map of parameters- Returns:
- map of parameters
-
getParameter
String getParameter(String name)
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
-
-