| Constructor and Description |
|---|
AircraftsResource() |
| Modifier and Type | Method and Description |
|---|---|
Aircraft |
create(String manufacturer,
String type,
Integer capacity,
Integer x,
Integer y) |
String |
delete(Integer id) |
Aircraft |
get(Integer aircraftId) |
Aircraft |
getAsHtml(Integer id) |
Collection<Aircraft> |
list() |
Collection<Aircraft> |
listAsHtml() |
String |
listAsString() |
Collection<Aircraft> |
listAvailable() |
String |
listAvailableAsString() |
@GET public Collection<Aircraft> list()
@GET @Produces(value="text/html") public Collection<Aircraft> listAsHtml()
@GET @Path(value="{id}") @Produces(value="text/html") @ErrorTemplate(name="/errors/404") public Aircraft getAsHtml(@PathParam(value="id") Integer id)
@DELETE @Path(value="{id}") @Produces(value="text/plain") @RolesAllowed(value="admin") public String delete(@PathParam(value="id") Integer id)
@POST @Consumes(value="application/x-www-form-urlencoded") @RolesAllowed(value="admin") @Detail public Aircraft create(@FormParam(value="manufacturer") String manufacturer, @FormParam(value="type") String type, @FormParam(value="capacity") Integer capacity, @DefaultValue(value="0") @FormParam(value="x-pos") Integer x, @DefaultValue(value="0") @FormParam(value="y-pos") Integer y)
@GET @Path(value="available") public Collection<Aircraft> listAvailable()
Copyright © 2007-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.