def conflictMissing(self, conflict): """ Conflict missing (Resolved by another one) Remove conflict in original object and notify to clients """ conflict.getFirstObject().updateResolved(conflict) notifier.conflictUpdate(-1)
def addUpdate(self, old_object, new_object, command_id): # Returns True if the update was resolved without user interaction try: mergeAction = old_object.addUpdate(new_object, command_id) if mergeAction: if old_object not in self.objects_with_updates: self.objects_with_updates.append(old_object) notifier.conflictUpdate(1) return False except Exception as ex: api.devlog("(%s).addUpdate(%s, %s) - failed" % (self, old_object, new_object)) return False self.mappers_manager.update(old_object, command_id) notifier.editHost(old_object) return True
def removeConflictsByObject(self, obj): if obj in self.objects_with_updates: self.objects_with_updates.remove(obj) notifier.conflictUpdate(-len(obj.getUpdates()))
def resolveConflict(self, conflict, kwargs): if self.__edit(conflict.getFirstObject(), **kwargs): conflict.getFirstObject().updateResolved(conflict) notifier.conflictUpdate(-1)