public class ChangeNotes extends AbstractChangeNotes<ChangeNotes>
Change
based on the log of its notes branch.Modifier and Type | Class and Description |
---|---|
static class |
ChangeNotes.Factory |
AbstractChangeNotes.Args, AbstractChangeNotes.LoadHandle
Modifier and Type | Field and Description |
---|---|
static com.google.common.collect.Ordering<ChangeMessage> |
MESSAGE_BY_TIME |
args, autoRebuild, primaryStorage
Constructor and Description |
---|
ChangeNotes(AbstractChangeNotes.Args args,
Change change) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsComment(Comment c) |
boolean |
containsCommentPublished(Comment c) |
com.google.common.collect.ImmutableList<Account.Id> |
getAllPastReviewers() |
com.google.common.collect.ImmutableListMultimap<PatchSet.Id,PatchSetApproval> |
getApprovals() |
Change |
getChange() |
com.google.common.collect.ImmutableList<ChangeMessage> |
getChangeMessages() |
com.google.common.collect.ImmutableListMultimap<PatchSet.Id,ChangeMessage> |
getChangeMessagesByPatchSet() |
com.google.common.collect.ImmutableSet<Comment.Key> |
getCommentKeys() |
com.google.common.collect.ImmutableListMultimap<RevId,Comment> |
getComments() |
PatchSet |
getCurrentPatchSet() |
com.google.common.collect.ImmutableListMultimap<RevId,Comment> |
getDraftComments(Account.Id author) |
com.google.common.collect.ImmutableListMultimap<RevId,Comment> |
getDraftComments(Account.Id author,
org.eclipse.jgit.lib.Ref ref) |
com.google.common.collect.ImmutableSet<java.lang.String> |
getHashtags() |
org.eclipse.jgit.lib.ObjectId |
getMetaId() |
com.google.common.collect.ImmutableSet<Account.Id> |
getPastAssignees() |
com.google.common.collect.ImmutableSortedMap<PatchSet.Id,PatchSet> |
getPatchSets() |
Project.NameKey |
getProjectName() |
java.sql.Timestamp |
getReadOnlyUntil() |
java.lang.String |
getRefName() |
ReviewerSet |
getReviewers() |
com.google.common.collect.ImmutableList<ReviewerStatusUpdate> |
getReviewerUpdates() |
RobotCommentNotes |
getRobotCommentNotes() |
com.google.common.collect.ImmutableListMultimap<RevId,RobotComment> |
getRobotComments() |
com.google.common.collect.ImmutableList<SubmitRecord> |
getSubmitRecords() |
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 AbstractChangeNotes.LoadHandle |
openHandle(org.eclipse.jgit.lib.Repository repo)
Open a handle for reading this entity from a repository.
|
static org.eclipse.jgit.errors.ConfigInvalidException |
parseException(Change.Id changeId,
java.lang.String fmt,
java.lang.Object... args) |
static Change |
readOneReviewDbChange(ReviewDb db,
Change.Id id) |
protected org.eclipse.jgit.lib.ObjectId |
readRef(org.eclipse.jgit.lib.Repository repo) |
getChangeId, getRevision, load, loadRevision, openHandle, reload, self
public static final com.google.common.collect.Ordering<ChangeMessage> MESSAGE_BY_TIME
public ChangeNotes(AbstractChangeNotes.Args args, Change change)
public static org.eclipse.jgit.errors.ConfigInvalidException parseException(Change.Id changeId, java.lang.String fmt, java.lang.Object... args)
public static Change readOneReviewDbChange(ReviewDb db, Change.Id id) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public Change getChange()
public org.eclipse.jgit.lib.ObjectId getMetaId()
public com.google.common.collect.ImmutableSortedMap<PatchSet.Id,PatchSet> getPatchSets()
public com.google.common.collect.ImmutableListMultimap<PatchSet.Id,PatchSetApproval> getApprovals()
public ReviewerSet getReviewers()
public com.google.common.collect.ImmutableList<ReviewerStatusUpdate> getReviewerUpdates()
public com.google.common.collect.ImmutableSet<Account.Id> getPastAssignees()
public com.google.common.collect.ImmutableSet<java.lang.String> getHashtags()
public com.google.common.collect.ImmutableList<Account.Id> getAllPastReviewers()
public com.google.common.collect.ImmutableList<SubmitRecord> getSubmitRecords()
public com.google.common.collect.ImmutableList<ChangeMessage> getChangeMessages()
public com.google.common.collect.ImmutableListMultimap<PatchSet.Id,ChangeMessage> getChangeMessagesByPatchSet()
public com.google.common.collect.ImmutableListMultimap<RevId,Comment> getComments()
public com.google.common.collect.ImmutableSet<Comment.Key> getCommentKeys()
public com.google.common.collect.ImmutableListMultimap<RevId,Comment> getDraftComments(Account.Id author) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public com.google.common.collect.ImmutableListMultimap<RevId,Comment> getDraftComments(Account.Id author, org.eclipse.jgit.lib.Ref ref) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public com.google.common.collect.ImmutableListMultimap<RevId,RobotComment> getRobotComments() throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public RobotCommentNotes getRobotCommentNotes()
public boolean containsComment(Comment c) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean containsCommentPublished(Comment c)
public java.lang.String getRefName()
getRefName
in class AbstractChangeNotes<ChangeNotes>
public PatchSet getCurrentPatchSet()
public java.sql.Timestamp getReadOnlyUntil()
protected void onLoad(AbstractChangeNotes.LoadHandle handle) throws NoSuchChangeException, java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
AbstractChangeNotes
onLoad
in class AbstractChangeNotes<ChangeNotes>
NoSuchChangeException
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
protected void loadDefaults()
AbstractChangeNotes
loadDefaults
in class AbstractChangeNotes<ChangeNotes>
public Project.NameKey getProjectName()
getProjectName
in class AbstractChangeNotes<ChangeNotes>
protected org.eclipse.jgit.lib.ObjectId readRef(org.eclipse.jgit.lib.Repository repo) throws java.io.IOException
readRef
in class AbstractChangeNotes<ChangeNotes>
java.io.IOException
protected AbstractChangeNotes.LoadHandle openHandle(org.eclipse.jgit.lib.Repository repo) throws NoSuchChangeException, java.io.IOException
AbstractChangeNotes
Implementations may override this method to provide auto-rebuilding behavior.
openHandle
in class AbstractChangeNotes<ChangeNotes>
repo
- open repository.NoSuchChangeException
- change does not exist.java.io.IOException
- a repo-level error occurred.