public class EventFactory extends Object
Modifier and Type | Method and Description |
---|---|
void |
addAllReviewers(com.google.gerrit.reviewdb.server.ReviewDb db,
ChangeAttribute a,
ChangeNotes notes)
Add allReviewers to an existing ChangeAttribute.
|
void |
addApprovals(PatchSetAttribute p,
Collection<com.google.gerrit.reviewdb.client.PatchSetApproval> list,
com.google.gerrit.common.data.LabelTypes labelTypes) |
void |
addApprovals(PatchSetAttribute p,
com.google.gerrit.reviewdb.client.PatchSet.Id id,
Map<com.google.gerrit.reviewdb.client.PatchSet.Id,Collection<com.google.gerrit.reviewdb.client.PatchSetApproval>> all,
com.google.gerrit.common.data.LabelTypes labelTypes) |
void |
addComments(ChangeAttribute ca,
Collection<com.google.gerrit.reviewdb.client.ChangeMessage> messages) |
void |
addCommitMessage(ChangeAttribute a,
String commitMessage) |
void |
addDependencies(org.eclipse.jgit.revwalk.RevWalk rw,
ChangeAttribute ca,
com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.PatchSet currentPs) |
void |
addPatchSetComments(PatchSetAttribute patchSetAttribute,
Collection<com.google.gerrit.reviewdb.client.PatchLineComment> patchLineComments) |
void |
addPatchSetFileNames(PatchSetAttribute patchSetAttribute,
com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.PatchSet patchSet) |
void |
addPatchSets(com.google.gerrit.reviewdb.server.ReviewDb db,
org.eclipse.jgit.revwalk.RevWalk revWalk,
ChangeAttribute ca,
Collection<com.google.gerrit.reviewdb.client.PatchSet> ps,
Map<com.google.gerrit.reviewdb.client.PatchSet.Id,Collection<com.google.gerrit.reviewdb.client.PatchSetApproval>> approvals,
boolean includeFiles,
com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.common.data.LabelTypes labelTypes) |
void |
addPatchSets(com.google.gerrit.reviewdb.server.ReviewDb db,
org.eclipse.jgit.revwalk.RevWalk revWalk,
ChangeAttribute ca,
Collection<com.google.gerrit.reviewdb.client.PatchSet> ps,
Map<com.google.gerrit.reviewdb.client.PatchSet.Id,Collection<com.google.gerrit.reviewdb.client.PatchSetApproval>> approvals,
com.google.gerrit.common.data.LabelTypes labelTypes) |
void |
addSubmitRecords(ChangeAttribute ca,
List<com.google.gerrit.common.data.SubmitRecord> submitRecords)
Add submitRecords to an existing ChangeAttribute.
|
void |
addTrackingIds(ChangeAttribute a,
com.google.common.collect.Multimap<String,String> set) |
AccountAttribute |
asAccountAttribute(com.google.gerrit.reviewdb.client.Account.Id id)
Create an AuthorAttribute for the given account suitable for serialization
to JSON.
|
AccountAttribute |
asAccountAttribute(com.google.gerrit.reviewdb.client.Account account)
Create an AuthorAttribute for the given account suitable for serialization
to JSON.
|
AccountAttribute |
asAccountAttribute(org.eclipse.jgit.lib.PersonIdent ident)
Create an AuthorAttribute for the given person ident suitable for
serialization to JSON.
|
ApprovalAttribute |
asApprovalAttribute(com.google.gerrit.reviewdb.client.PatchSetApproval approval,
com.google.gerrit.common.data.LabelTypes labelTypes)
Create an ApprovalAttribute for the given approval suitable for
serialization to JSON.
|
ChangeAttribute |
asChangeAttribute(com.google.gerrit.reviewdb.client.Change change)
Create a ChangeAttribute for the given change suitable for serialization to
JSON.
|
ChangeAttribute |
asChangeAttribute(com.google.gerrit.reviewdb.server.ReviewDb db,
com.google.gerrit.reviewdb.client.Change change)
Create a ChangeAttribute for the given change suitable for serialization to
JSON.
|
MessageAttribute |
asMessageAttribute(com.google.gerrit.reviewdb.client.ChangeMessage message) |
PatchSetAttribute |
asPatchSetAttribute(com.google.gerrit.reviewdb.server.ReviewDb db,
org.eclipse.jgit.revwalk.RevWalk revWalk,
com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.PatchSet patchSet)
Create a PatchSetAttribute for the given patchset suitable for
serialization to JSON.
|
PatchSetAttribute |
asPatchSetAttribute(org.eclipse.jgit.revwalk.RevWalk revWalk,
com.google.gerrit.reviewdb.client.Change change,
com.google.gerrit.reviewdb.client.PatchSet patchSet)
Create a PatchSetAttribute for the given patchset suitable for
serialization to JSON.
|
PatchSetCommentAttribute |
asPatchSetLineAttribute(com.google.gerrit.reviewdb.client.PatchLineComment c) |
RefUpdateAttribute |
asRefUpdateAttribute(org.eclipse.jgit.lib.ObjectId oldId,
org.eclipse.jgit.lib.ObjectId newId,
com.google.gerrit.reviewdb.client.Branch.NameKey refName)
Create a RefUpdateAttribute for the given old ObjectId, new ObjectId, and
branch that is suitable for serialization to JSON.
|
void |
extend(ChangeAttribute a,
com.google.gerrit.reviewdb.client.Change change)
Extend the existing ChangeAttribute with additional fields.
|
public ChangeAttribute asChangeAttribute(com.google.gerrit.reviewdb.client.Change change)
change
- public ChangeAttribute asChangeAttribute(com.google.gerrit.reviewdb.server.ReviewDb db, com.google.gerrit.reviewdb.client.Change change)
db
- Review databasechange
- public RefUpdateAttribute asRefUpdateAttribute(org.eclipse.jgit.lib.ObjectId oldId, org.eclipse.jgit.lib.ObjectId newId, com.google.gerrit.reviewdb.client.Branch.NameKey refName)
oldId
- newId
- refName
- public void extend(ChangeAttribute a, com.google.gerrit.reviewdb.client.Change change)
a
- change
- public void addAllReviewers(com.google.gerrit.reviewdb.server.ReviewDb db, ChangeAttribute a, ChangeNotes notes) throws com.google.gwtorm.server.OrmException
a
- notes
- com.google.gwtorm.server.OrmException
public void addSubmitRecords(ChangeAttribute ca, List<com.google.gerrit.common.data.SubmitRecord> submitRecords)
ca
- submitRecords
- public void addDependencies(org.eclipse.jgit.revwalk.RevWalk rw, ChangeAttribute ca, com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.PatchSet currentPs)
public void addTrackingIds(ChangeAttribute a, com.google.common.collect.Multimap<String,String> set)
public void addCommitMessage(ChangeAttribute a, String commitMessage)
public void addPatchSets(com.google.gerrit.reviewdb.server.ReviewDb db, org.eclipse.jgit.revwalk.RevWalk revWalk, ChangeAttribute ca, Collection<com.google.gerrit.reviewdb.client.PatchSet> ps, Map<com.google.gerrit.reviewdb.client.PatchSet.Id,Collection<com.google.gerrit.reviewdb.client.PatchSetApproval>> approvals, com.google.gerrit.common.data.LabelTypes labelTypes)
public void addPatchSets(com.google.gerrit.reviewdb.server.ReviewDb db, org.eclipse.jgit.revwalk.RevWalk revWalk, ChangeAttribute ca, Collection<com.google.gerrit.reviewdb.client.PatchSet> ps, Map<com.google.gerrit.reviewdb.client.PatchSet.Id,Collection<com.google.gerrit.reviewdb.client.PatchSetApproval>> approvals, boolean includeFiles, com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.common.data.LabelTypes labelTypes)
public void addPatchSetComments(PatchSetAttribute patchSetAttribute, Collection<com.google.gerrit.reviewdb.client.PatchLineComment> patchLineComments)
public void addPatchSetFileNames(PatchSetAttribute patchSetAttribute, com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.PatchSet patchSet)
public void addComments(ChangeAttribute ca, Collection<com.google.gerrit.reviewdb.client.ChangeMessage> messages)
public PatchSetAttribute asPatchSetAttribute(org.eclipse.jgit.revwalk.RevWalk revWalk, com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.PatchSet patchSet)
revWalk
- patchSet
- public PatchSetAttribute asPatchSetAttribute(com.google.gerrit.reviewdb.server.ReviewDb db, org.eclipse.jgit.revwalk.RevWalk revWalk, com.google.gerrit.reviewdb.client.Change change, com.google.gerrit.reviewdb.client.PatchSet patchSet)
db
- Review databasepatchSet
- public void addApprovals(PatchSetAttribute p, com.google.gerrit.reviewdb.client.PatchSet.Id id, Map<com.google.gerrit.reviewdb.client.PatchSet.Id,Collection<com.google.gerrit.reviewdb.client.PatchSetApproval>> all, com.google.gerrit.common.data.LabelTypes labelTypes)
public void addApprovals(PatchSetAttribute p, Collection<com.google.gerrit.reviewdb.client.PatchSetApproval> list, com.google.gerrit.common.data.LabelTypes labelTypes)
public AccountAttribute asAccountAttribute(com.google.gerrit.reviewdb.client.Account.Id id)
id
- public AccountAttribute asAccountAttribute(com.google.gerrit.reviewdb.client.Account account)
account
- public AccountAttribute asAccountAttribute(org.eclipse.jgit.lib.PersonIdent ident)
ident
- public ApprovalAttribute asApprovalAttribute(com.google.gerrit.reviewdb.client.PatchSetApproval approval, com.google.gerrit.common.data.LabelTypes labelTypes)
approval
- labelTypes
- label types for the containing projectpublic MessageAttribute asMessageAttribute(com.google.gerrit.reviewdb.client.ChangeMessage message)
public PatchSetCommentAttribute asPatchSetLineAttribute(com.google.gerrit.reviewdb.client.PatchLineComment c)