@Test public void testLoadEntityLabelAsync() { handler.async(2); entityLabelService.loadEntityLabelAsync("defect", new NonDispatchTestCallback<String>(handler) { @Override protected void evaluate(String data) { Assert.assertEquals("Defect", data); } }); entityLabelService.loadEntityLabelAsync("defect", new DispatchTestCallback<String>(handler) { @Override protected void evaluate(String data) { Assert.assertEquals("Defect", data); } }); }
public void loadEntityLabelAsync(final String entityType, Callback<String> callback) { getValueAsync(ENTITIES, translate(callback, new Transform<Map<String, String>, String>() { @Override public String transform(Map<String, String> labelMap) { if(labelMap.containsKey(entityType)) { return labelMap.get(entityType); } else { return entityType; } } })); }
EntityLabelService extends AbstractCachingService<Integer, Map<String, String>, AbstractCachingService.Callback<Map<String, String>>> { public void loadEntityLabelAsync(final String entityType, Callback<String> callback) { getValueAsync(ENTITIES, translate(callback, new Transform<Map<String, String>, String>() { @Override public String transform(Map<String, String> labelMap) { if(labelMap.containsKey(entityType)) { return labelMap.get(entityType); } else { return entityType; } } })); } }
EntityLabelService extends AbstractCachingService<Integer, Map<String, String>, AbstractCachingService.Callback<Map<String, String>>> { public void loadEntityLabelAsync(final String entityType, Callback<String> callback) { getValueAsync(ENTITIES, translate(callback, new Transform<Map<String, String>, String>() { @Override public String transform(Map<String, String> labelMap) { if(labelMap.containsKey(entityType)) { return labelMap.get(entityType); } else { return entityType; } } })); } EntityLabelService(Project project, RestService restService); }
EntityLabelService extends AbstractCachingService<Integer, Map<String, String>, AbstractCachingService.Callback<Map<String, String>>> { public void loadEntityLabelAsync(final String entityType, Callback<String> callback) { getValueAsync(ENTITIES, translate(callback, new Transform<Map<String, String>, String>() { @Override public String transform(Map<String, String> labelMap) { if(labelMap.containsKey(entityType)) { return labelMap.get(entityType); } else { return entityType; } } })); } EntityLabelService(Project project, RestService restService); void loadEntityLabelAsync(final String entityType, Callback<String> callback); }
EntityLabelService extends AbstractCachingService<Integer, Map<String, String>, AbstractCachingService.Callback<Map<String, String>>> { public void loadEntityLabelAsync(final String entityType, Callback<String> callback) { getValueAsync(ENTITIES, translate(callback, new Transform<Map<String, String>, String>() { @Override public String transform(Map<String, String> labelMap) { if(labelMap.containsKey(entityType)) { return labelMap.get(entityType); } else { return entityType; } } })); } EntityLabelService(Project project, RestService restService); void loadEntityLabelAsync(final String entityType, Callback<String> callback);  }