Class StormtrooperResource


  • @Path("/troopers")
    @Produces("application/json")
    public class StormtrooperResource
    extends Object
    Stormtrooper Resource.
    • Constructor Detail

      • StormtrooperResource

        @Inject
        public StormtrooperResource​(StormtrooperDao trooperDao)
    • Method Detail

      • listTroopers

        @GET
        public Collection<Stormtrooper> listTroopers()
        Returns a Collection of all Stormtroopers.
        Returns:
        Returns a Collection of all Stormtroopers.
      • listTroopersView

        @GET
        @Produces("text/html")
        public StormtroopersView listTroopersView()
      • getTrooper

        @GET
        @Path("/{id}")
        public Stormtrooper getTrooper​(@PathParam("id")
                                       String id)
      • getTrooperView

        @GET
        @Path("/{id}")
        @Produces("text/html")
        public StormtrooperView getTrooperView​(@PathParam("id")
                                               String id)
      • deleteTrooper

        @Path("/{id}")
        @DELETE
        public void deleteTrooper​(@PathParam("id")
                                  String id)