@Test public void testGetMappingsFound() throws Exception { Response res = resource.readRealm("1234"); Assert.assertEquals(Response.Status.OK.getStatusCode(), res.getStatus()); Assert.assertNotNull(res.getEntity()); }
@GET @Path("{realmId}") @RightsAllowed({ Right.ADMIN_ACCESS }) public Response readRealm(@PathParam("realmId") String realmId) { EntityBody result = service.get(realmId); return Response.ok(result).build(); }
RealmResource { @GET @Path("{realmId}") @RightsAllowed({ Right.ADMIN_ACCESS }) public Response readRealm(@PathParam("realmId") String realmId) { EntityBody result = service.get(realmId); return Response.ok(result).build(); } }
RealmResource { @GET @Path("{realmId}") @RightsAllowed({ Right.ADMIN_ACCESS }) public Response readRealm(@PathParam("realmId") String realmId) { EntityBody result = service.get(realmId); return Response.ok(result).build(); }  }
RealmResource { @GET @Path("{realmId}") @RightsAllowed({ Right.ADMIN_ACCESS }) public Response readRealm(@PathParam("realmId") String realmId) { EntityBody result = service.get(realmId); return Response.ok(result).build(); }  @PostConstruct void init(); void setService(EntityService service); @PUT @Path("{realmId}") @Consumes("application/json") @RightsAllowed({ Right.CRUD_REALM }) Response updateRealm(@PathParam("realmId") String realmId, EntityBody updatedRealm,
            @Context final UriInfo uriInfo); @DELETE @Path("{realmId}") @RightsAllowed({ Right.CRUD_REALM }) Response deleteRealm(@PathParam("realmId") String realmId, @Context final UriInfo uriInfo); @POST @RightsAllowed({ Right.CRUD_REALM }) Response createRealm(EntityBody newRealm, @Context final UriInfo uriInfo); @GET @Path("{realmId}") @RightsAllowed({ Right.ADMIN_ACCESS }) Response readRealm(@PathParam("realmId") String realmId); @GET @RightsAllowed({ Right.ADMIN_ACCESS }) Response getRealms(@QueryParam(REALM) @DefaultValue("") String realm, @Context UriInfo info); }
RealmResource { @GET @Path("{realmId}") @RightsAllowed({ Right.ADMIN_ACCESS }) public Response readRealm(@PathParam("realmId") String realmId) { EntityBody result = service.get(realmId); return Response.ok(result).build(); }  @PostConstruct void init(); void setService(EntityService service); @PUT @Path("{realmId}") @Consumes("application/json") @RightsAllowed({ Right.CRUD_REALM }) Response updateRealm(@PathParam("realmId") String realmId, EntityBody updatedRealm,
            @Context final UriInfo uriInfo); @DELETE @Path("{realmId}") @RightsAllowed({ Right.CRUD_REALM }) Response deleteRealm(@PathParam("realmId") String realmId, @Context final UriInfo uriInfo); @POST @RightsAllowed({ Right.CRUD_REALM }) Response createRealm(EntityBody newRealm, @Context final UriInfo uriInfo); @GET @Path("{realmId}") @RightsAllowed({ Right.ADMIN_ACCESS }) Response readRealm(@PathParam("realmId") String realmId); @GET @RightsAllowed({ Right.ADMIN_ACCESS }) Response getRealms(@QueryParam(REALM) @DefaultValue("") String realm, @Context UriInfo info); static final String REALM; static final String ED_ORG; static final String RESPONSE; static final String NAME; static final String UNIQUE_IDENTIFIER; static final String IDP_ID; static final String ARTIFACT_RESOLUTION_ENDPOINT; static final String SOURCE_ID; static final String IDP; }