@Test public void testGetIdentityTypes() { final Map<String, Class> expected = Maps.newHashMap(); expected.put("user", UserDto.class); expected.put("device", DeviceDto.class); final Map<String, Class> actual = get(METADATA_IDENTITY_TYPES_ENDPOINT) .assertStatus(Status.OK) .result(map(String.class, Class.class)); assertEquals(expected, actual); }
@GET @Path("/identityTypes") public Map<String, Class<?>> getIdentityTypes() { return identityTypesByName; }
MetadataResource extends BaseResource { @GET @Path("/identityTypes") public Map<String, Class<?>> getIdentityTypes() { return identityTypesByName; } }
MetadataResource extends BaseResource { @GET @Path("/identityTypes") public Map<String, Class<?>> getIdentityTypes() { return identityTypesByName; } @Inject  MetadataResource(Environment environment, IdentitiesMetadata metadata, Mappers mapper); }
MetadataResource extends BaseResource { @GET @Path("/identityTypes") public Map<String, Class<?>> getIdentityTypes() { return identityTypesByName; } @Inject  MetadataResource(Environment environment, IdentitiesMetadata metadata, Mappers mapper); @GET @Path("/identityTypes") Map<String, Class<?>> getIdentityTypes(); @GET @Path("/identityTypes/{identityType}/schema") JsonSchema getSchema(@PathParam("identityType") String identityType); @GET @Path("/identityTypes/{identityType}/attributes") Set<String> getAttributes(@PathParam("identityType") String identityType); @POST @Path("/identity/attributes") Map<String, Object> computeAttributes(@Valid IdentityDto request); }
MetadataResource extends BaseResource { @GET @Path("/identityTypes") public Map<String, Class<?>> getIdentityTypes() { return identityTypesByName; } @Inject  MetadataResource(Environment environment, IdentitiesMetadata metadata, Mappers mapper); @GET @Path("/identityTypes") Map<String, Class<?>> getIdentityTypes(); @GET @Path("/identityTypes/{identityType}/schema") JsonSchema getSchema(@PathParam("identityType") String identityType); @GET @Path("/identityTypes/{identityType}/attributes") Set<String> getAttributes(@PathParam("identityType") String identityType); @POST @Path("/identity/attributes") Map<String, Object> computeAttributes(@Valid IdentityDto request);  }