@Test public void testListWorkspacesAsync() { handler.addRequest(false, "GET", "/qcbin/rest/domains/domain/projects/project/product-groups?fields=&query={}&order-by={}", 200) .content("workspaceServiceTest_workspaces.xml"); handler.async(); workspaceService.listWorkspacesAsync(new AbstractCachingService.Callback<Map<Integer, String>>() { @Override public void loaded(final Map<Integer, String> map) { handler.done(new Runnable() { @Override public void run() { Assert.assertEquals(3, map.size()); Assert.assertEquals("All", map.get(-1)); Assert.assertEquals("Blue", map.get(1000)); Assert.assertEquals("Green", map.get(1001)); } }); } }); }
public void listWorkspacesAsync(Callback<Map<Integer, String>> callback) { getValueAsync(null, translate(callback, new Transform<EntityList, Map<Integer, String>>() { @Override public Map<Integer, String> transform(EntityList entities) { return toWorkspaceMap(entities); } })); }
WorkspaceService extends AbstractCachingEntityService<Void> { public void listWorkspacesAsync(Callback<Map<Integer, String>> callback) { getValueAsync(null, translate(callback, new Transform<EntityList, Map<Integer, String>>() { @Override public Map<Integer, String> transform(EntityList entities) { return toWorkspaceMap(entities); } })); } }
WorkspaceService extends AbstractCachingEntityService<Void> { public void listWorkspacesAsync(Callback<Map<Integer, String>> callback) { getValueAsync(null, translate(callback, new Transform<EntityList, Map<Integer, String>>() { @Override public Map<Integer, String> transform(EntityList entities) { return toWorkspaceMap(entities); } })); } WorkspaceService(Project project, EntityService entityService, RestService restService, WorkspaceConfiguration workspaceConfiguration); }
WorkspaceService extends AbstractCachingEntityService<Void> { public void listWorkspacesAsync(Callback<Map<Integer, String>> callback) { getValueAsync(null, translate(callback, new Transform<EntityList, Map<Integer, String>>() { @Override public Map<Integer, String> transform(EntityList entities) { return toWorkspaceMap(entities); } })); } WorkspaceService(Project project, EntityService entityService, RestService restService, WorkspaceConfiguration workspaceConfiguration); int getWorkspaceId(); String getWorkspaceName(); void selectWorkspace(int id, String name); Map<Integer, String> listWorkspaces(); void listWorkspacesAsync(Callback<Map<Integer, String>> callback); }
WorkspaceService extends AbstractCachingEntityService<Void> { public void listWorkspacesAsync(Callback<Map<Integer, String>> callback) { getValueAsync(null, translate(callback, new Transform<EntityList, Map<Integer, String>>() { @Override public Map<Integer, String> transform(EntityList entities) { return toWorkspaceMap(entities); } })); } WorkspaceService(Project project, EntityService entityService, RestService restService, WorkspaceConfiguration workspaceConfiguration); int getWorkspaceId(); String getWorkspaceName(); void selectWorkspace(int id, String name); Map<Integer, String> listWorkspaces(); void listWorkspacesAsync(Callback<Map<Integer, String>> callback);  }