public class ChangeResource extends java.lang.Object implements RestResource, RestResource.HasETag
Modifier and Type | Class and Description |
---|---|
static interface |
ChangeResource.Factory |
RestResource.HasETag, RestResource.HasLastModified
Modifier and Type | Field and Description |
---|---|
static com.google.inject.TypeLiteral<RestView<ChangeResource>> |
CHANGE_KIND |
static int |
JSON_FORMAT_VERSION
JSON format version number for ETag computations.
|
Modifier and Type | Method and Description |
---|---|
Change |
getChange() |
java.lang.String |
getETag() |
Change.Id |
getId() |
ChangeNotes |
getNotes() |
Project.NameKey |
getProject() |
CurrentUser |
getUser() |
boolean |
isUserOwner() |
PermissionBackend.ForChange |
permissions() |
void |
prepareETag(com.google.common.hash.Hasher h,
CurrentUser user) |
public static final int JSON_FORMAT_VERSION
Should be bumped on any JSON format change (new fields, etc.) so that otherwise unmodified changes get new ETags.
public static final com.google.inject.TypeLiteral<RestView<ChangeResource>> CHANGE_KIND
public PermissionBackend.ForChange permissions()
public CurrentUser getUser()
public Change.Id getId()
public boolean isUserOwner()
getUser()
is the change's owner.public Change getChange()
public Project.NameKey getProject()
public ChangeNotes getNotes()
public void prepareETag(com.google.common.hash.Hasher h, CurrentUser user)
public java.lang.String getETag()
getETag
in interface RestResource.HasETag