Interface IModelUpdateStrategy
- All Known Implementing Classes:
SingleValuedAttributeModelUpdateStrategy
public interface IModelUpdateStrategy
A strategy for updating the model with changes made from within a content merge viewer.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanUpdate(Diff diff, IMergeViewer.MergeViewerSide side) Specifies whether the value in the model can to be updated on the givenside.getModelUpdateCommand(Diff diff, Object newValue, IMergeViewer.MergeViewerSide side) Returns a command for updating the underlying model with the givennewValueon the givenside.
-
Method Details
-
canUpdate
Specifies whether the value in the model can to be updated on the givenside.- Parameters:
diff- The diff acting as context of the potential model update.side- The side to check.- Returns:
trueif the value can be updated,falseotherwise.
-
getModelUpdateCommand
Returns a command for updating the underlying model with the givennewValueon the givenside.- Parameters:
diff- The diff acting as context of the model update.newValue- The new value to be set.side- The side on which the update is to be performed.- Returns:
- A command to perform the model update.
-