public class CommitsCollection extends java.lang.Object implements ChildCollection<ProjectResource,CommitResource>
| Constructor and Description | 
|---|
CommitsCollection(DynamicMap<RestView<CommitResource>> views,
                 GitRepositoryManager repoManager,
                 ChangeIndexCollection indexes,
                 com.google.inject.Provider<InternalChangeQuery> queryProvider,
                 Reachable reachable)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
canRead(ProjectState state,
       org.eclipse.jgit.lib.Repository repo,
       org.eclipse.jgit.revwalk.RevCommit commit)  | 
RestView<ProjectResource> | 
list()
Create a view to list the contents of the collection. 
 | 
CommitResource | 
parse(ProjectResource parent,
     IdString id)
Parse a path component into a resource handle. 
 | 
DynamicMap<RestView<CommitResource>> | 
views()
Get the views that support this collection. 
 | 
@Inject public CommitsCollection(DynamicMap<RestView<CommitResource>> views, GitRepositoryManager repoManager, ChangeIndexCollection indexes, com.google.inject.Provider<InternalChangeQuery> queryProvider, Reachable reachable)
public RestView<ProjectResource> list() throws ResourceNotFoundException
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<ProjectResource,CommitResource>ResourceNotFoundException - if the collection doesn't support listing.public CommitResource parse(ProjectResource parent, IdString id) throws RestApiException, java.io.IOException
RestCollectionparse in interface RestCollection<ProjectResource,CommitResource>parent - 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.RestApiExceptionjava.io.IOExceptionpublic DynamicMap<RestView<CommitResource>> views()
RestCollectionWithin a resource the views are accessed as RESOURCE/plugin~view.
views in interface RestCollection<ProjectResource,CommitResource>public boolean canRead(ProjectState state, org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.revwalk.RevCommit commit)
commit is visible to the caller.