Class NewValueRule

  • All Implemented Interfaces:
    StoreConstants

    public class NewValueRule
    extends ConflictResolutionRule
    This rule resolves Update/Update conflict on attribute by setting a new value.
    Since:
    jcms-8.0.0
    • Field Detail

      • newValue

        protected java.lang.String newValue
    • Constructor Detail

      • NewValueRule

        public NewValueRule​(java.lang.String target,
                            java.lang.String action)
    • 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: ConflictResolutionRule
        Returns the resolved value for the conflict on the given attribute or null if the conflict must be ignored.
        Overrides:
        getResolvedAttributeValue in class ConflictResolutionRule
        Parameters:
        id - the data id
        className - the data class
        attName - the name of the attribute
        value1 - the value of the attribute in store1
        value2 - 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.