@Test public void testSelectSprint() throws Throwable { selectTestRelease(); WaitForEventsListener listener = new WaitForEventsListener(sprintService, false, true, false); sprintService.selectSprint(new Entity("release-cycle", 1001)); listener.waitForEvents(null, 1001, null); }
public synchronized void selectSprint(Entity sprint) { if((sprint != null && sprint.equals(this.sprintSelector.selected) && isSameTense(sprint, this.sprintSelector.selected)) || (sprint == null && this.sprintSelector.selected == null)) { return; } this.sprintSelector.selected = sprint; fireSprintSelected(); }
SprintService implements PersistentStateComponent<Element>, ServerTypeListener, CachingEntityListener { public synchronized void selectSprint(Entity sprint) { if((sprint != null && sprint.equals(this.sprintSelector.selected) && isSameTense(sprint, this.sprintSelector.selected)) || (sprint == null && this.sprintSelector.selected == null)) { return; } this.sprintSelector.selected = sprint; fireSprintSelected(); } }
SprintService implements PersistentStateComponent<Element>, ServerTypeListener, CachingEntityListener { public synchronized void selectSprint(Entity sprint) { if((sprint != null && sprint.equals(this.sprintSelector.selected) && isSameTense(sprint, this.sprintSelector.selected)) || (sprint == null && this.sprintSelector.selected == null)) { return; } this.sprintSelector.selected = sprint; fireSprintSelected(); } SprintService(Project project); }
SprintService implements PersistentStateComponent<Element>, ServerTypeListener, CachingEntityListener { public synchronized void selectSprint(Entity sprint) { if((sprint != null && sprint.equals(this.sprintSelector.selected) && isSameTense(sprint, this.sprintSelector.selected)) || (sprint == null && this.sprintSelector.selected == null)) { return; } this.sprintSelector.selected = sprint; fireSprintSelected(); } 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 void selectSprint(Entity sprint) { if((sprint != null && sprint.equals(this.sprintSelector.selected) && isSameTense(sprint, this.sprintSelector.selected)) || (sprint == null && this.sprintSelector.selected == null)) { return; } this.sprintSelector.selected = sprint; fireSprintSelected(); } 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);  }