Class IgnoreEmptyItemRule
- java.lang.Object
-
- com.jalios.jcms.tools.storemerge.rule.ConflictResolutionRule
-
- com.jalios.jcms.tools.storemerge.rule.IgnoreEmptyItemRule
-
- All Implemented Interfaces:
StoreConstants
public class IgnoreEmptyItemRule extends ConflictResolutionRule
This rule resolves Update/Update conflict on array attribute by ignoring empty values.- Since:
- jcms-8.0.0
-
-
Field Summary
-
Fields inherited from class com.jalios.jcms.tools.storemerge.rule.ConflictResolutionRule
ACTION_DELETE, ACTION_IGNORE, ACTION_IGNORE_EMPTY_ITEM, ACTION_IGNORE_ORDER, ACTION_MERGE, ACTION_PREFER_NOT_EMPTY, ACTION_STORE1, ACTION_STORE2, ACTION_UPDATE
-
Fields inherited from interface com.jalios.jstore.StoreConstants
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 Summary
Constructors Constructor Description IgnoreEmptyItemRule(java.lang.String target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.boolean
checkArray(java.lang.String value1, java.lang.String value2)
boolean
checkCollection(java.lang.String value1, java.lang.String value2)
java.lang.String
getAction()
Returns the name of the action.-
Methods inherited from class com.jalios.jcms.tools.storemerge.rule.ConflictResolutionRule
buildRule, canResolveCreateCreateConflict, canResolveUpdateDeleteConflict, decodeArray, decodeCollectionOrMapItemSet, decodeList, getResolvedAttributeValue, isArray, isArrayOrCollectionAttribute, isCollection, isMap, isMapAttribute, parseTarget, resolveCreateCreateConflict, resolveUpdateDeleteConflict, selectorMatches, toString
-
-
-
-
Method Detail
-
canResolveAttributeConflict
public boolean canResolveAttributeConflict(java.lang.String id, java.lang.String className, java.lang.String attName, java.lang.String value1, java.lang.String value2)
Description copied from class:ConflictResolutionRule
Returns true if the conflict on the given attribute can be resolved by a rule.- Overrides:
canResolveAttributeConflict
in classConflictResolutionRule
- Parameters:
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 store1- Returns:
- true if the conflict on the given attribute can be resolved by a rule.
-
checkArray
public boolean checkArray(java.lang.String value1, java.lang.String value2)
-
checkCollection
public boolean checkCollection(java.lang.String value1, java.lang.String value2)
-
getAction
public java.lang.String getAction()
Description copied from class:ConflictResolutionRule
Returns the name of the action.- Overrides:
getAction
in classConflictResolutionRule
- Returns:
- the name of the action.
-
-