Class Store1Rule
- java.lang.Object
 - 
- com.jalios.jcms.tools.storemerge.rule.ConflictResolutionRule
 - 
- com.jalios.jcms.tools.storemerge.rule.Store1Rule
 
 
 
- 
- All Implemented Interfaces:
 StoreConstants
public class Store1Rule extends ConflictResolutionRule
This rule resolves Update/Update conflict on attribute by setting the value of store1. This rule resolves Update/Delete conflict on data by selecting operation list of store1.- 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 Store1Rule(java.lang.String target) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAction()Returns the name of the action.java.lang.StringgetResolvedAttributeValue(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.java.util.List<StorableLogEntry>resolveCreateCreateConflict(java.util.List<StorableLogEntry> store1OpList, java.util.List<StorableLogEntry> store2OpList)Returns either store1OpList or store2OpList according the resolution behavior.java.util.List<StorableLogEntry>resolveUpdateDeleteConflict(java.util.List<StorableLogEntry> store1OpList, java.util.List<StorableLogEntry> store2OpList)Returns either store1OpList or store2OpList according the resolution behavior.- 
Methods inherited from class com.jalios.jcms.tools.storemerge.rule.ConflictResolutionRule
buildRule, canResolveAttributeConflict, canResolveCreateCreateConflict, canResolveUpdateDeleteConflict, decodeArray, decodeCollectionOrMapItemSet, decodeList, isArray, isArrayOrCollectionAttribute, isCollection, isMap, isMapAttribute, parseTarget, selectorMatches, toString 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getResolvedAttributeValue
public java.lang.String getResolvedAttributeValue(java.lang.String id, java.lang.String className, java.lang.String attName, java.lang.String value1, java.lang.String value2)Description copied from class:ConflictResolutionRuleReturns the resolved value for the conflict on the given attribute or null if the conflict must be ignored.- Overrides:
 getResolvedAttributeValuein 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:
 - the resolved value for the conflict on the given attribute or null if the conflict must be ignored.
 
 
- 
resolveUpdateDeleteConflict
public java.util.List<StorableLogEntry> resolveUpdateDeleteConflict(java.util.List<StorableLogEntry> store1OpList, java.util.List<StorableLogEntry> store2OpList)
Description copied from class:ConflictResolutionRuleReturns either store1OpList or store2OpList according the resolution behavior.- Overrides:
 resolveUpdateDeleteConflictin classConflictResolutionRule- Parameters:
 store1OpList- the list of operations on the data from store 1store2OpList- the list of operations on the data from store 1- Returns:
 - either store1OpList or store2OpList according the resolution behavior.
 
 
- 
resolveCreateCreateConflict
public java.util.List<StorableLogEntry> resolveCreateCreateConflict(java.util.List<StorableLogEntry> store1OpList, java.util.List<StorableLogEntry> store2OpList)
Description copied from class:ConflictResolutionRuleReturns either store1OpList or store2OpList according the resolution behavior.- Overrides:
 resolveCreateCreateConflictin classConflictResolutionRule- Parameters:
 store1OpList- the list of operations on the data from store 1store2OpList- the list of operations on the data from store 1- Returns:
 - either store1OpList or store2OpList according the resolution behavior.
 
 
- 
getAction
public java.lang.String getAction()
Description copied from class:ConflictResolutionRuleReturns the name of the action.- Overrides:
 getActionin classConflictResolutionRule- Returns:
 - the name of the action.
 
 
 - 
 
 -