public class StarredChangesUtil
extends java.lang.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 java.lang.String |
DEFAULT_LABEL |
static com.google.common.collect.ImmutableSortedSet<java.lang.String> |
DEFAULT_LABELS |
static java.lang.String |
IGNORE_LABEL |
static java.lang.String |
REVIEWED_LABEL |
static java.lang.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,java.lang.String> |
byChangeFromIndex(Change.Id changeId) |
com.google.common.collect.ImmutableSortedSet<java.lang.String> |
getLabels(Account.Id accountId,
Change.Id changeId) |
org.eclipse.jgit.lib.ObjectId |
getObjectId(Account.Id accountId,
Change.Id changeId) |
static java.util.Set<java.lang.Integer> |
getStarredPatchSets(java.util.Set<java.lang.String> labels,
java.lang.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,
java.lang.String refName) |
com.google.common.collect.ImmutableSortedSet<java.lang.String> |
star(Account.Id accountId,
Project.NameKey project,
Change.Id changeId,
java.util.Set<java.lang.String> labelsToAdd,
java.util.Set<java.lang.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,
java.util.Collection<java.lang.String> labels) |
public static final java.lang.String DEFAULT_LABEL
public static final java.lang.String IGNORE_LABEL
public static final java.lang.String REVIEWED_LABEL
public static final java.lang.String UNREVIEWED_LABEL
public static final com.google.common.collect.ImmutableSortedSet<java.lang.String> DEFAULT_LABELS
public com.google.common.collect.ImmutableSortedSet<java.lang.String> getLabels(Account.Id accountId, Change.Id changeId)
public com.google.common.collect.ImmutableSortedSet<java.lang.String> star(Account.Id accountId, Project.NameKey project, Change.Id changeId, java.util.Set<java.lang.String> labelsToAdd, java.util.Set<java.lang.String> labelsToRemove) throws StarredChangesUtil.IllegalLabelException
public void unstarAll(Project.NameKey project, Change.Id changeId)
public com.google.common.collect.ImmutableMap<Account.Id,StarredChangesUtil.StarRef> byChange(Change.Id changeId)
public com.google.common.collect.ImmutableListMultimap<Account.Id,java.lang.String> byChangeFromIndex(Change.Id changeId)
public org.eclipse.jgit.lib.ObjectId getObjectId(Account.Id accountId, Change.Id changeId)
public void ignore(ChangeResource rsrc) throws StarredChangesUtil.IllegalLabelException
public void unignore(ChangeResource rsrc) throws StarredChangesUtil.IllegalLabelException
public boolean isIgnoredBy(Change.Id changeId, Account.Id accountId)
public boolean isIgnored(ChangeResource rsrc)
public void markAsReviewed(ChangeResource rsrc) throws StarredChangesUtil.IllegalLabelException
public void markAsUnreviewed(ChangeResource rsrc) throws StarredChangesUtil.IllegalLabelException
public static StarredChangesUtil.StarRef readLabels(org.eclipse.jgit.lib.Repository repo, java.lang.String refName) throws java.io.IOException
java.io.IOException
public static org.eclipse.jgit.lib.ObjectId writeLabels(org.eclipse.jgit.lib.Repository repo, java.util.Collection<java.lang.String> labels) throws java.io.IOException, StarredChangesUtil.InvalidLabelsException
java.io.IOException
StarredChangesUtil.InvalidLabelsException
public static java.util.Set<java.lang.Integer> getStarredPatchSets(java.util.Set<java.lang.String> labels, java.lang.String label)