Refactor ChangeUpdate: Make superclass AbstractChangeUpdate
Similar to the change that refactors ChangeNotes out, I created a
superclass, AbstractChangeUpdate, for use by both ChangeUpdate and the
new Update class I will be writing for the purpose of draft
comments. I extracted all common variables and methods that I thought
generically should be part of an "update" of this kind.
However, I left some out (see commit()) because they depended on
functions that I thought aren't generic enough to be part of a generic
update (see storeCommentsInNotes()).
Finally, there was one method in ChangeUpdate that I refactored out to
CommentsInNotesUtil because I knew that it will be needed there. I
changed that method a bit because the old implementation depended on
the fact that we were going to just be adding comments to the list of
preexisting comments. However, with drafts, we will be adding and
deleting, so I changed that method to force the caller to have already
made all modifications to the list, so that the method just writes the
list it is given to a note and writes that note to the NoteMap.
Change-Id: I0229e895e34c4ddd728b461ac64e3b3be936032d
3 files changed