Class StormtrooperResource
- java.lang.Object
 - 
- com.okta.authn.sdk.example.resources.StormtrooperResource
 
 
- 
@Path("/troopers") @Produces("application/json") public class StormtrooperResource extends ObjectStormtrooper Resource. 
- 
- 
Constructor Summary
Constructors Constructor Description StormtrooperResource(StormtrooperDao trooperDao) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StormtroopercreateTrooper(Stormtrooper trooper)voiddeleteTrooper(String id)StormtroopergetTrooper(String id)StormtrooperViewgetTrooperView(String id)Collection<Stormtrooper>listTroopers()Returns a Collection of all Stormtroopers.StormtroopersViewlistTroopersView()StormtrooperupdateTrooper(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) 
 - 
 
 -