@Test public void testGetTeams() throws Throwable { selectTestRelease(); sprintService.resetValues(); teamRequests_TestRelease(handler); for(int i = 0; i < 3; i++) { handler.async(); ApplicationManager.getApplication().executeOnPooledThread(new Runnable() { @Override public void run() { final EntityList teams = sprintService.getTeams(); handler.done(new Runnable() { @Override public void run() { Assert.assertEquals(2, teams.size()); Assert.assertEquals(101, teams.get(0).getId()); Assert.assertEquals(102, teams.get(1).getId()); } }); } }); } handler.consume(); }
public synchronized EntityList getTeams() { final Entity release = this.releaseSelector.selected; if(release != null) { return getValues(teamSelector, new Runnable() { @Override public void run() { loadTeams(release); } }); } else { return null; } }
SprintService implements PersistentStateComponent<Element>, ServerTypeListener, CachingEntityListener { public synchronized EntityList getTeams() { final Entity release = this.releaseSelector.selected; if(release != null) { return getValues(teamSelector, new Runnable() { @Override public void run() { loadTeams(release); } }); } else { return null; } } }
SprintService implements PersistentStateComponent<Element>, ServerTypeListener, CachingEntityListener { public synchronized EntityList getTeams() { final Entity release = this.releaseSelector.selected; if(release != null) { return getValues(teamSelector, new Runnable() { @Override public void run() { loadTeams(release); } }); } else { return null; } } SprintService(Project project); }
SprintService implements PersistentStateComponent<Element>, ServerTypeListener, CachingEntityListener { public synchronized EntityList getTeams() { final Entity release = this.releaseSelector.selected; if(release != null) { return getValues(teamSelector, new Runnable() { @Override public void run() { loadTeams(release); } }); } else { return null; } } SprintService(Project project); Element getState(); void loadState(Element state); @Override void connectedTo(ServerType serverType); synchronized Entity getRelease(); synchronized Entity getSprint(); synchronized Entity getTeam(); void addListener(Listener listener); void removeListener(Listener listener); synchronized void selectRelease(final Entity release); synchronized void selectSprint(Entity sprint); synchronized void selectTeam(Entity team); synchronized Entity getCurrentSprint(); synchronized EntityList getTeams(); EntityList getSprints(); EntityList getReleases(); static boolean isSameTense(Entity sprint1, Entity sprint2); static boolean isCurrentSprint(Entity sprint); static long distance(long now, Entity entity); @Override Entity lookup(final EntityRef ref); @Override void entityLoaded(Entity entity, Event event); @Override void entityNotFound(EntityRef ref, boolean removed); }
SprintService implements PersistentStateComponent<Element>, ServerTypeListener, CachingEntityListener { public synchronized EntityList getTeams() { final Entity release = this.releaseSelector.selected; if(release != null) { return getValues(teamSelector, new Runnable() { @Override public void run() { loadTeams(release); } }); } else { return null; } } SprintService(Project project); Element getState(); void loadState(Element state); @Override void connectedTo(ServerType serverType); synchronized Entity getRelease(); synchronized Entity getSprint(); synchronized Entity getTeam(); void addListener(Listener listener); void removeListener(Listener listener); synchronized void selectRelease(final Entity release); synchronized void selectSprint(Entity sprint); synchronized void selectTeam(Entity team); synchronized Entity getCurrentSprint(); synchronized EntityList getTeams(); EntityList getSprints(); EntityList getReleases(); static boolean isSameTense(Entity sprint1, Entity sprint2); static boolean isCurrentSprint(Entity sprint); static long distance(long now, Entity entity); @Override Entity lookup(final EntityRef ref); @Override void entityLoaded(Entity entity, Event event); @Override void entityNotFound(EntityRef ref, boolean removed);  }