public class StarredChangesUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StarredChangesUtil.IllegalLabelException |
static class |
StarredChangesUtil.InvalidLabelsException |
static class |
StarredChangesUtil.MutuallyExclusiveLabelsException |
static class |
StarredChangesUtil.StarField |
static class |
StarredChangesUtil.StarRef |
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_LABEL |
static com.google.common.collect.ImmutableSortedSet<String> |
DEFAULT_LABELS |
static String |
IGNORE_LABEL |
static String |
REVIEWED_LABEL |
static String |
UNREVIEWED_LABEL |
Modifier and Type | Method and Description |
---|---|
com.google.common.collect.ImmutableMap<Account.Id,StarredChangesUtil.StarRef> |
byChange(Change.Id changeId) |
com.google.common.collect.ImmutableListMultimap<Account.Id,String> |
byChangeFromIndex(Change.Id changeId) |
com.google.common.collect.ImmutableSortedSet<String> |
getLabels(Account.Id accountId,
Change.Id changeId) |
org.eclipse.jgit.lib.ObjectId |
getObjectId(Account.Id accountId,
Change.Id changeId) |
static Set<Integer> |
getStarredPatchSets(Set<String> labels,
String label) |
void |
ignore(ChangeResource rsrc) |
boolean |
isIgnored(ChangeResource rsrc) |
boolean |
isIgnoredBy(Change.Id changeId,
Account.Id accountId) |
void |
markAsReviewed(ChangeResource rsrc) |
void |
markAsUnreviewed(ChangeResource rsrc) |
static StarredChangesUtil.StarRef |
readLabels(org.eclipse.jgit.lib.Repository repo,
String refName) |
com.google.common.collect.ImmutableSortedSet<String> |
star(Account.Id accountId,
Project.NameKey project,
Change.Id changeId,
Set<String> labelsToAdd,
Set<String> labelsToRemove) |
void |
unignore(ChangeResource rsrc) |
void |
unstarAll(Project.NameKey project,
Change.Id changeId) |
static org.eclipse.jgit.lib.ObjectId |
writeLabels(org.eclipse.jgit.lib.Repository repo,
Collection<String> labels) |
public static final String DEFAULT_LABEL
public static final String IGNORE_LABEL
public static final String REVIEWED_LABEL
public static final String UNREVIEWED_LABEL
public static final com.google.common.collect.ImmutableSortedSet<String> DEFAULT_LABELS
public com.google.common.collect.ImmutableSortedSet<String> getLabels(Account.Id accountId, Change.Id changeId) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public com.google.common.collect.ImmutableSortedSet<String> star(Account.Id accountId, Project.NameKey project, Change.Id changeId, Set<String> labelsToAdd, Set<String> labelsToRemove) throws com.google.gwtorm.server.OrmException, StarredChangesUtil.IllegalLabelException
com.google.gwtorm.server.OrmException
StarredChangesUtil.IllegalLabelException
public void unstarAll(Project.NameKey project, Change.Id changeId) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public com.google.common.collect.ImmutableMap<Account.Id,StarredChangesUtil.StarRef> byChange(Change.Id changeId) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public com.google.common.collect.ImmutableListMultimap<Account.Id,String> byChangeFromIndex(Change.Id changeId) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public org.eclipse.jgit.lib.ObjectId getObjectId(Account.Id accountId, Change.Id changeId)
public void ignore(ChangeResource rsrc) throws com.google.gwtorm.server.OrmException, StarredChangesUtil.IllegalLabelException
com.google.gwtorm.server.OrmException
StarredChangesUtil.IllegalLabelException
public void unignore(ChangeResource rsrc) throws com.google.gwtorm.server.OrmException, StarredChangesUtil.IllegalLabelException
com.google.gwtorm.server.OrmException
StarredChangesUtil.IllegalLabelException
public boolean isIgnoredBy(Change.Id changeId, Account.Id accountId) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public boolean isIgnored(ChangeResource rsrc) throws com.google.gwtorm.server.OrmException
com.google.gwtorm.server.OrmException
public void markAsReviewed(ChangeResource rsrc) throws com.google.gwtorm.server.OrmException, StarredChangesUtil.IllegalLabelException
com.google.gwtorm.server.OrmException
StarredChangesUtil.IllegalLabelException
public void markAsUnreviewed(ChangeResource rsrc) throws com.google.gwtorm.server.OrmException, StarredChangesUtil.IllegalLabelException
com.google.gwtorm.server.OrmException
StarredChangesUtil.IllegalLabelException
public static StarredChangesUtil.StarRef readLabels(org.eclipse.jgit.lib.Repository repo, String refName) throws IOException
IOException
public static org.eclipse.jgit.lib.ObjectId writeLabels(org.eclipse.jgit.lib.Repository repo, Collection<String> labels) throws IOException, StarredChangesUtil.InvalidLabelsException