Class PatchSetUtil


  • public class PatchSetUtil
    extends Object
    Utilities for manipulating patch sets.
    • Method Detail

      • current

        public PatchSet current​(ReviewDb db,
                                ChangeNotes notes)
                         throws com.google.gwtorm.server.OrmException
        Throws:
        com.google.gwtorm.server.OrmException
      • byChange

        public com.google.common.collect.ImmutableCollection<PatchSet> byChange​(ReviewDb db,
                                                                                ChangeNotes notes)
                                                                         throws com.google.gwtorm.server.OrmException
        Throws:
        com.google.gwtorm.server.OrmException
      • byChangeAsMap

        public com.google.common.collect.ImmutableMap<PatchSet.Id,​PatchSet> byChangeAsMap​(ReviewDb db,
                                                                                                ChangeNotes notes)
                                                                                         throws com.google.gwtorm.server.OrmException
        Throws:
        com.google.gwtorm.server.OrmException
      • publish

        public void publish​(ReviewDb db,
                            ChangeUpdate update,
                            PatchSet ps)
                     throws com.google.gwtorm.server.OrmException
        Throws:
        com.google.gwtorm.server.OrmException
      • setGroups

        public void setGroups​(ReviewDb db,
                              ChangeUpdate update,
                              PatchSet ps,
                              List<String> groups)
                       throws com.google.gwtorm.server.OrmException
        Throws:
        com.google.gwtorm.server.OrmException
      • isPatchSetLocked

        public boolean isPatchSetLocked​(ChangeNotes notes)
                                 throws com.google.gwtorm.server.OrmException,
                                        IOException
        Is the current patch set locked against state changes?
        Throws:
        com.google.gwtorm.server.OrmException
        IOException
      • getRevCommit

        public org.eclipse.jgit.revwalk.RevCommit getRevCommit​(Project.NameKey project,
                                                               PatchSet patchSet)
                                                        throws IOException
        Returns the commit for the given project at the given patchset revision
        Throws:
        IOException