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