public class ChangesCollection extends java.lang.Object implements RestCollection<TopLevelResource,ChangeResource>
| Constructor and Description |
|---|
ChangesCollection(com.google.inject.Provider<ReviewDb> db,
com.google.inject.Provider<CurrentUser> user,
com.google.inject.Provider<QueryChanges> queryFactory,
DynamicMap<RestView<ChangeResource>> views,
ChangeFinder changeFinder,
ChangeResource.Factory changeResourceFactory,
PermissionBackend permissionBackend,
ProjectCache projectCache) |
| Modifier and Type | Method and Description |
|---|---|
QueryChanges |
list()
Create a view to list the contents of the collection.
|
ChangeResource |
parse(Change.Id id) |
ChangeResource |
parse(ChangeNotes notes,
CurrentUser user) |
ChangeResource |
parse(TopLevelResource root,
IdString id)
Parse a path component into a resource handle.
|
DynamicMap<RestView<ChangeResource>> |
views()
Get the views that support this collection.
|
@Inject public ChangesCollection(com.google.inject.Provider<ReviewDb> db, com.google.inject.Provider<CurrentUser> user, com.google.inject.Provider<QueryChanges> queryFactory, DynamicMap<RestView<ChangeResource>> views, ChangeFinder changeFinder, ChangeResource.Factory changeResourceFactory, PermissionBackend permissionBackend, ProjectCache projectCache)
public QueryChanges list()
RestCollectionThe returned view should accept the parent type to scope the search, and may want to take a "q" parameter option to narrow the results.
list in interface RestCollection<TopLevelResource,ChangeResource>public DynamicMap<RestView<ChangeResource>> views()
RestCollectionWithin a resource the views are accessed as RESOURCE/plugin~view.
views in interface RestCollection<TopLevelResource,ChangeResource>public ChangeResource parse(TopLevelResource root, IdString id) throws RestApiException, com.google.gwtorm.server.OrmException, PermissionBackendException, java.io.IOException
RestCollectionparse in interface RestCollection<TopLevelResource,ChangeResource>root - the handle to the collection.id - string identifier supplied by the client. In a URL such as /changes/1234/abandon this string is "1234".ResourceNotFoundException - the object does not exist, or the caller is not permitted to
know if the resource exists.RestApiExceptioncom.google.gwtorm.server.OrmExceptionPermissionBackendExceptionjava.io.IOExceptionpublic ChangeResource parse(Change.Id id) throws RestApiException, com.google.gwtorm.server.OrmException, PermissionBackendException, java.io.IOException
RestApiExceptioncom.google.gwtorm.server.OrmExceptionPermissionBackendExceptionjava.io.IOExceptionpublic ChangeResource parse(ChangeNotes notes, CurrentUser user)