Package com.deltaxml.mergecommon.config
Class RuleConfiguration
java.lang.Object
com.deltaxml.mergecommon.config.RuleConfiguration
Allows the rule based processing to be configured for the Concurrent Merge or Three Way Merge object. Supplies configuration
info which is used during extract operations. The configuration applies rules to process both deltaV2 and simplified-delta
outputs. Could be extended in future.
- Since:
- 4.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new RuleConfiguration object that contains settings for rule based processing. -
Method Summary
Modifier and TypeMethodDescriptiondeepCopy()Create a deep copy of this RuleConfiguration.Reports the current setting of the DisplayChangesBy parameter.Reports the current setting of the DisplayChangesTo parameter.Reports the current setting of the DisplayFormatChangesIn parameter.booleanReports the current setting of the DisplaySimpleAdds parameter.booleanReports the current setting of the DisplaySimpleDeletes parameter.booleanReports the current setting of the DisplaySimpleModify parameter.Reports the current setting of the Version Priority list.booleanbooleanvoidsetDisableRulesForAllTableContent(boolean disableRulesForAllTableContent) voidsetDisableRulesForTables(boolean disableRulesForTables) voidsetDisplayChangesInvolving(Set<String> versions) Specifies the set of versions for which all changes should be displayed.voidsetDisplayChangesTo(String xpath) Specifies which elements in the result are always displayed to the user.voidsetDisplayFormatChangesIn(String xpath) Specifies which elements contain formatting elements, where the user wants formatting changes displayed.voidsetDisplaySimpleAdds(boolean display) Controls whether simple adds are displayed.voidsetDisplaySimpleDeletes(boolean display) Controls whether simple deletes are displayed.voidsetDisplaySimpleModify(boolean display) Controls whether simple modifications are displayed.voidsetVersionPriorityList(List<String> priorityList) Specifies the version priority list for resolving simple conflicts.toString()
-
Constructor Details
-
RuleConfiguration
public RuleConfiguration()Create a new RuleConfiguration object that contains settings for rule based processing.
-
-
Method Details
-
setDisplayChangesInvolving
Specifies the set of versions for which all changes should be displayed.- Parameters:
versions- a set of delta versions specified using Strings
-
getDisplayChangesInvolving
Reports the current setting of the DisplayChangesBy parameter.- Returns:
- the current set of versions which are displayed
-
setDisplayChangesTo
Specifies which elements in the result are always displayed to the user. That is, elements that will never have their differences resolved by rule-based processing.- Parameters:
xpath- An XPath expression (up to XPath 3.1) that returns 0 or more elements when evaluated against the raw result.- Throws:
IllegalArgumentException- if the string is null, zero length or cannot be compiled to an XPath
-
getDisplayChangesTo
Reports the current setting of the DisplayChangesTo parameter.- Returns:
- a String representing the XPath
-
setDisplayFormatChangesIn
Specifies which elements contain formatting elements, where the user wants formatting changes displayed.- Parameters:
xpath- An XPath expression (up to XPath 3.1) that returns 0 or more elements when evaluated against the raw result.- Throws:
IllegalArgumentException- if the string is null, zero length or cannot be compiled to an XPath
-
getDisplayFormatChangesIn
Reports the current setting of the DisplayFormatChangesIn parameter.- Returns:
- a String representing the XPath
-
setDisplaySimpleAdds
public void setDisplaySimpleAdds(boolean display) Controls whether simple adds are displayed.- Parameters:
display- when true all adds are displayed, when false adds are displayed according to other rules
-
getDisplaySimpleAdds
public boolean getDisplaySimpleAdds()Reports the current setting of the DisplaySimpleAdds parameter.- Returns:
- a boolean indicating whether simple adds are always displayed
-
setDisplaySimpleDeletes
public void setDisplaySimpleDeletes(boolean display) Controls whether simple deletes are displayed.- Parameters:
display- when true all deletes are displayed, when false deletes are displayed according to other rules
-
getDisplaySimpleDeletes
public boolean getDisplaySimpleDeletes()Reports the current setting of the DisplaySimpleDeletes parameter.- Returns:
- a boolean indicating whether simple deletes are always displayed
-
setDisplaySimpleModify
public void setDisplaySimpleModify(boolean display) Controls whether simple modifications are displayed.- Parameters:
display- when true all modifications are displayed, when false modifications are displayed according to other rules
-
getDisplaySimpleModify
public boolean getDisplaySimpleModify()Reports the current setting of the DisplaySimpleModify parameter.- Returns:
- a boolean indicating whether simple modifications are always displayed
-
setVersionPriorityList
Specifies the version priority list for resolving simple conflicts. The version priority list should not contain an ancestor version as all the conflicts are resolved using concurrently modified versions.- Parameters:
priorityList- a list of priority versions specified using Strings- Since:
- 4.1
-
getVersionPriorityList
Reports the current setting of the Version Priority list.- Returns:
- the current list of priority versions
- Since:
- 4.1
-
isDisableRulesForTables
public boolean isDisableRulesForTables() -
setDisableRulesForTables
public void setDisableRulesForTables(boolean disableRulesForTables) -
isDisableRulesForAllTableContent
public boolean isDisableRulesForAllTableContent() -
setDisableRulesForAllTableContent
public void setDisableRulesForAllTableContent(boolean disableRulesForAllTableContent) -
deepCopy
Create a deep copy of this RuleConfiguration. This function is required for testing only and should not be made public- Returns:
- clone
-
toString
-