Package com.google.gerrit.server.notedb
Class DraftCommentNotes
- java.lang.Object
-
- com.google.gerrit.server.notedb.AbstractChangeNotes<DraftCommentNotes>
-
- com.google.gerrit.server.notedb.DraftCommentNotes
-
public class DraftCommentNotes extends AbstractChangeNotes<DraftCommentNotes>
View of the draft comments for a singleChange
based on the log of its drafts branch.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DraftCommentNotes.Factory
-
Nested classes/interfaces inherited from class com.google.gerrit.server.notedb.AbstractChangeNotes
AbstractChangeNotes.Args, AbstractChangeNotes.LoadHandle
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.server.notedb.AbstractChangeNotes
args
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsComment(HumanComment c)
Account.Id
getAuthor()
com.google.common.collect.ImmutableListMultimap<org.eclipse.jgit.lib.ObjectId,HumanComment>
getComments()
Project.NameKey
getProjectName()
Returns the NameKey for the project where the notes should be stored, which is not necessarily the same as the change's project.protected String
getRefName()
Returns name of the reference storing this configuration.protected void
loadDefaults()
Load default values for any instance variables when NoteDb is disabled.protected void
onLoad(AbstractChangeNotes.LoadHandle handle)
Set up the metadata, parsing any state from the loaded revision.protected org.eclipse.jgit.lib.ObjectId
readRef(org.eclipse.jgit.lib.Repository repo)
-
Methods inherited from class com.google.gerrit.server.notedb.AbstractChangeNotes
getChangeId, getRevision, load, load, loadRevision, openHandle, reload, self
-
-
-
-
Method Detail
-
getAuthor
public Account.Id getAuthor()
-
getComments
public com.google.common.collect.ImmutableListMultimap<org.eclipse.jgit.lib.ObjectId,HumanComment> getComments()
-
containsComment
public boolean containsComment(HumanComment c)
-
getRefName
protected String getRefName()
Description copied from class:AbstractChangeNotes
Returns name of the reference storing this configuration.- Specified by:
getRefName
in classAbstractChangeNotes<DraftCommentNotes>
-
readRef
protected org.eclipse.jgit.lib.ObjectId readRef(org.eclipse.jgit.lib.Repository repo) throws IOException
- Overrides:
readRef
in classAbstractChangeNotes<DraftCommentNotes>
- Throws:
IOException
-
onLoad
protected void onLoad(AbstractChangeNotes.LoadHandle handle) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException
Description copied from class:AbstractChangeNotes
Set up the metadata, parsing any state from the loaded revision.- Specified by:
onLoad
in classAbstractChangeNotes<DraftCommentNotes>
- Throws:
IOException
org.eclipse.jgit.errors.ConfigInvalidException
-
loadDefaults
protected void loadDefaults()
Description copied from class:AbstractChangeNotes
Load default values for any instance variables when NoteDb is disabled.- Specified by:
loadDefaults
in classAbstractChangeNotes<DraftCommentNotes>
-
getProjectName
public Project.NameKey getProjectName()
Description copied from class:AbstractChangeNotes
Returns the NameKey for the project where the notes should be stored, which is not necessarily the same as the change's project.- Specified by:
getProjectName
in classAbstractChangeNotes<DraftCommentNotes>
-
-