@Test public void testGetState_None() throws Throwable { Element state = sprintService.getState(); Assert.assertEquals("SprintService", state.getName()); Assert.assertNull(state.getAttributeValue("release-id")); Assert.assertNull(state.getAttributeValue("release-name")); Assert.assertNull(state.getAttributeValue("release-cycle-id")); Assert.assertNull(state.getAttributeValue("release-cycle-name")); Assert.assertNull(state.getAttributeValue("team-id")); Assert.assertNull(state.getAttributeValue("team-name")); }
public Element getState() { Element element = new Element(getClass().getSimpleName()); addElement(element, releaseSelector.selected); addElement(element, sprintSelector.selected); addElement(element, teamSelector.selected); return element; }
SprintService implements PersistentStateComponent<Element>, ServerTypeListener, CachingEntityListener { public Element getState() { Element element = new Element(getClass().getSimpleName()); addElement(element, releaseSelector.selected); addElement(element, sprintSelector.selected); addElement(element, teamSelector.selected); return element; } }
SprintService implements PersistentStateComponent<Element>, ServerTypeListener, CachingEntityListener { public Element getState() { Element element = new Element(getClass().getSimpleName()); addElement(element, releaseSelector.selected); addElement(element, sprintSelector.selected); addElement(element, teamSelector.selected); return element; } SprintService(Project project); }
SprintService implements PersistentStateComponent<Element>, ServerTypeListener, CachingEntityListener { public Element getState() { Element element = new Element(getClass().getSimpleName()); addElement(element, releaseSelector.selected); addElement(element, sprintSelector.selected); addElement(element, teamSelector.selected); return element; } 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 Element getState() { Element element = new Element(getClass().getSimpleName()); addElement(element, releaseSelector.selected); addElement(element, sprintSelector.selected); addElement(element, teamSelector.selected); return element; } 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);  }