public class Emails extends Object implements ChildCollection<AccountResource,AccountResource.Email>, AcceptsCreate<AccountResource>
Modifier and Type | Method and Description |
---|---|
CreateEmail |
create(AccountResource parent,
IdString email)
Handle creation of a child resource.
|
RestView<AccountResource> |
list()
Create a view to list the contents of the collection.
|
AccountResource.Email |
parse(AccountResource rsrc,
IdString id)
Parse a path component into a resource handle.
|
DynamicMap<RestView<AccountResource.Email>> |
views()
Get the views that support this collection.
|
public RestView<AccountResource> 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<AccountResource,AccountResource.Email>
public AccountResource.Email parse(AccountResource rsrc, IdString id) throws ResourceNotFoundException
RestCollection
parse
in interface RestCollection<AccountResource,AccountResource.Email>
rsrc
- 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.public DynamicMap<RestView<AccountResource.Email>> views()
RestCollection
Within a resource the views are accessed as RESOURCE/plugin~view
.
views
in interface RestCollection<AccountResource,AccountResource.Email>
public CreateEmail create(AccountResource parent, IdString email)
AcceptsCreate
create
in interface AcceptsCreate<AccountResource>
parent
- parent collection handle.email
- id of the resource being created.