public class CachesCollection extends Object implements ChildCollection<ConfigResource,CacheResource>, AcceptsPost<ConfigResource>
Modifier and Type | Method and Description |
---|---|
RestView<ConfigResource> |
list()
Create a view to list the contents of the collection.
|
CacheResource |
parse(ConfigResource parent,
IdString id)
Parse a path component into a resource handle.
|
PostCaches |
post(ConfigResource parent)
Handle creation of a child resource by POST on the collection.
|
DynamicMap<RestView<CacheResource>> |
views()
Get the views that support this collection.
|
public RestView<ConfigResource> list()
RestCollection
The 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<ConfigResource,CacheResource>
public CacheResource parse(ConfigResource parent, IdString id) throws AuthException, ResourceNotFoundException
RestCollection
parse
in interface RestCollection<ConfigResource,CacheResource>
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.AuthException
public DynamicMap<RestView<CacheResource>> views()
RestCollection
Within a resource the views are accessed as RESOURCE/plugin~view
.
views
in interface RestCollection<ConfigResource,CacheResource>
public PostCaches post(ConfigResource parent) throws RestApiException
AcceptsPost
post
in interface AcceptsPost<ConfigResource>
parent
- parent collection handle.RestApiException
- the view cannot be constructed.