Package com.google.gerrit.server.account
Class EmailsCollection
- java.lang.Object
-
- com.google.gerrit.server.account.EmailsCollection
-
- All Implemented Interfaces:
AcceptsCreate<AccountResource>
,ChildCollection<AccountResource,AccountResource.Email>
,RestCollection<AccountResource,AccountResource.Email>
,RestView<AccountResource>
public class EmailsCollection extends Object implements ChildCollection<AccountResource,AccountResource.Email>, AcceptsCreate<AccountResource>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
list
public RestView<AccountResource> list()
Description copied from interface:RestCollection
Create a view to list the contents of the collection.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.
- Specified by:
list
in interfaceRestCollection<AccountResource,AccountResource.Email>
- Returns:
- view to list the collection.
-
parse
public AccountResource.Email parse(AccountResource rsrc, IdString id) throws ResourceNotFoundException, PermissionBackendException, AuthException
Description copied from interface:RestCollection
Parse a path component into a resource handle.- Specified by:
parse
in interfaceRestCollection<AccountResource,AccountResource.Email>
- Parameters:
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"
.- Returns:
- a resource handle for the identified object.
- Throws:
ResourceNotFoundException
- the object does not exist, or the caller is not permitted to know if the resource exists.PermissionBackendException
AuthException
-
views
public DynamicMap<RestView<AccountResource.Email>> views()
Description copied from interface:RestCollection
Get the views that support this collection.Within a resource the views are accessed as
RESOURCE/plugin~view
.- Specified by:
views
in interfaceRestCollection<AccountResource,AccountResource.Email>
- Returns:
- map of views.
-
create
public CreateEmail create(AccountResource parent, IdString email)
Description copied from interface:AcceptsCreate
Handle creation of a child resource.- Specified by:
create
in interfaceAcceptsCreate<AccountResource>
- Parameters:
parent
- parent collection handle.email
- id of the resource being created.- Returns:
- a view to perform the creation. The create method must embed the id into the newly returned view object, as it will not be passed.
-
-