public class MergeRule extends ConflictResolutionRule
ACTION_DELETE, ACTION_IGNORE, ACTION_IGNORE_EMPTY_ITEM, ACTION_IGNORE_ORDER, ACTION_MERGE, ACTION_PREFER_NOT_EMPTY, ACTION_STORE1, ACTION_STORE2, ACTION_UPDATE
ARRAY_FLAG, CLEANING_STATE, COLLECTION_FLAG, CREATE_OP, DELETE_OP, IDLE_STATE, INNER_LOGS, INNER_MILESTONE, INNER_PREFIX, INNER_SYNC, ITEM_ESCAPE_CHAR, ITEM_SEPARATOR, LOADING_STATE, MAP_ASSIGN, MAP_CHARS_TO_ESCAPE, MAP_CLASS_SEPARATOR, MAP_FLAG, NAMESPACE, REVISION, SH_SUFFIX, STORING_STATE, UPDATE_OP
Constructor and Description |
---|
MergeRule(java.lang.String target) |
Modifier and Type | Method and Description |
---|---|
boolean |
canResolveAttributeConflict(java.lang.String id,
java.lang.String className,
java.lang.String attName,
java.lang.String value1,
java.lang.String value2)
Returns true if the conflict on the given attribute can be resolved by a rule.
|
java.lang.String |
getAction()
Returns the name of the action.
|
java.lang.String |
getResolvedAttributeValue(java.lang.String id,
java.lang.String className,
java.lang.String attName,
java.lang.String value1,
java.lang.String value2)
Returns the resolved value for the conflict on the given attribute or null if the conflict must be ignored.
|
protected java.lang.String |
mergeArray(java.lang.String value1,
java.lang.String value2) |
protected java.lang.String |
mergeMap(java.lang.String value1,
java.lang.String value2) |
protected java.lang.String |
mergeSet(java.lang.String value1,
java.lang.String value2) |
buildRule, canResolveCreateCreateConflict, canResolveUpdateDeleteConflict, decodeArray, decodeCollectionOrMapItemSet, decodeList, isArray, isArrayOrCollectionAttribute, isCollection, isMap, isMapAttribute, parseTarget, resolveCreateCreateConflict, resolveUpdateDeleteConflict, selectorMatches, toString
public boolean canResolveAttributeConflict(java.lang.String id, java.lang.String className, java.lang.String attName, java.lang.String value1, java.lang.String value2)
ConflictResolutionRule
canResolveAttributeConflict
in class ConflictResolutionRule
id
- the data idclassName
- the data classattName
- the name of the attributevalue1
- the value of the attribute in store1value2
- the value of the attribute in store1public java.lang.String getResolvedAttributeValue(java.lang.String id, java.lang.String className, java.lang.String attName, java.lang.String value1, java.lang.String value2)
ConflictResolutionRule
getResolvedAttributeValue
in class ConflictResolutionRule
id
- the data idclassName
- the data classattName
- the name of the attributevalue1
- the value of the attribute in store1value2
- the value of the attribute in store1protected java.lang.String mergeArray(java.lang.String value1, java.lang.String value2)
protected java.lang.String mergeSet(java.lang.String value1, java.lang.String value2)
protected java.lang.String mergeMap(java.lang.String value1, java.lang.String value2)
public java.lang.String getAction()
ConflictResolutionRule
getAction
in class ConflictResolutionRule
Copyright © 2001-2017 Jalios SA. All Rights Reserved.