Class StormtrooperResource
- java.lang.Object
-
- com.okta.authn.sdk.example.resources.StormtrooperResource
-
@Path("/troopers") @Produces("application/json") public class StormtrooperResource extends Object
Stormtrooper Resource.
-
-
Constructor Summary
Constructors Constructor Description StormtrooperResource(StormtrooperDao trooperDao)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stormtrooper
createTrooper(Stormtrooper trooper)
void
deleteTrooper(String id)
Stormtrooper
getTrooper(String id)
StormtrooperView
getTrooperView(String id)
Collection<Stormtrooper>
listTroopers()
Returns a Collection of all Stormtroopers.StormtroopersView
listTroopersView()
Stormtrooper
updateTrooper(String id, Stormtrooper updatedTrooper)
-
-
-
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)
-
createTrooper
@POST public Stormtrooper createTrooper(Stormtrooper trooper)
-
updateTrooper
@Path("/{id}") @POST public Stormtrooper updateTrooper(@PathParam("id") String id, Stormtrooper updatedTrooper)
-
deleteTrooper
@Path("/{id}") @DELETE public void deleteTrooper(@PathParam("id") String id)
-
-