public class BranchesCollection extends Object implements ChildCollection<ProjectResource,BranchResource>, AcceptsCreate<ProjectResource>
| Modifier and Type | Method and Description |
|---|---|
CreateBranch |
create(ProjectResource parent,
IdString name)
Handle creation of a child resource.
|
RestView<ProjectResource> |
list()
Create a view to list the contents of the collection.
|
BranchResource |
parse(ProjectResource parent,
IdString id)
Parse a path component into a resource handle.
|
DynamicMap<RestView<BranchResource>> |
views()
Get the views that support this collection.
|
public RestView<ProjectResource> 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<ProjectResource,BranchResource>public BranchResource parse(ProjectResource parent, IdString id) throws ResourceNotFoundException, IOException, BadRequestException
RestCollectionparse in interface RestCollection<ProjectResource,BranchResource>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.IOExceptionBadRequestExceptionpublic DynamicMap<RestView<BranchResource>> views()
RestCollectionWithin a resource the views are accessed as RESOURCE/plugin~view.
views in interface RestCollection<ProjectResource,BranchResource>public CreateBranch create(ProjectResource parent, IdString name)
AcceptsCreatecreate in interface AcceptsCreate<ProjectResource>parent - parent collection handle.name - id of the resource being created.