| Constructor and Description |
|---|
FlightsResource() |
| Modifier and Type | Method and Description |
|---|---|
String |
book(String flightId) |
org.glassfish.jersey.server.mvc.Viewable |
bookAsHtml(String flightId) |
Flight |
create(Integer aircraftId) |
String |
delete(String flightId) |
Flight |
get(String flightId) |
Flight |
getAsHtml(String flightId) |
Collection<Flight> |
list() |
org.glassfish.jersey.server.mvc.Viewable |
listAsCsv() |
Collection<Flight> |
listAsHtml() |
String |
listAsString() |
Collection<Flight> |
listAsYaml() |
Collection<Flight> |
listOpen() |
String |
listOpenAsString() |
String |
updateStatus(String flightId,
String newStatus) |
@GET public Collection<Flight> list()
@GET @Produces(value="text/html") public Collection<Flight> listAsHtml()
@GET @Produces(value="text/csv") public org.glassfish.jersey.server.mvc.Viewable listAsCsv()
@GET @Produces(value="application/x-yaml") public Collection<Flight> listAsYaml()
@GET @Path(value="{id}") @Produces(value="text/html") @ErrorTemplate(name="/errors/404") public Flight getAsHtml(@PathParam(value="id") String flightId)
@POST @Path(value="{id}/new-booking") @Produces(value="text/plain") public String book(@PathParam(value="id") String flightId)
@POST @Path(value="{id}/new-booking") @Produces(value="text/html") public org.glassfish.jersey.server.mvc.Viewable bookAsHtml(@PathParam(value="id") String flightId)
@POST @Consumes(value="application/x-www-form-urlencoded") @RolesAllowed(value="admin") @Detail public Flight create(@FormParam(value="aircraftId") Integer aircraftId)
@DELETE @Path(value="{id}") @Produces(value="text/plain") @RolesAllowed(value="admin") public String delete(@PathParam(value="id") String flightId)
@POST @Path(value="{id}/status") @Consumes(value="application/x-www-form-urlencoded") @Produces(value="text/plain") @RolesAllowed(value="admin") public String updateStatus(@PathParam(value="id") String flightId, @FormParam(value="status") String newStatus)
@GET @Path(value="open") public Collection<Flight> listOpen()
Copyright © 2007-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.