@Test public void controller_shouldInitializeModelForReleaseVersions() { String oldVersion = buildProperties.getVersion(); buildProperties.setVersion("13.3"); FragmentModel model = new FragmentModel(); controller.controller(model, kenyaui); Assert.assertThat(model, hasEntry("moduleVersion", (Object) "13.3")); Assert.assertThat(model, hasKey("systemLocation")); Assert.assertThat(model, hasKey("systemLocationCode")); buildProperties.setVersion(oldVersion); }
public void controller(FragmentModel model, @SpringBean KenyaUiUtils kenyaui) { Map<String, Object> kenyaemrInfo = ServerInformation.getKenyaemrInformation(); String moduleVersion = (String) kenyaemrInfo.get("version"); boolean isSnapshot = moduleVersion.endsWith("SNAPSHOT"); if (isSnapshot) { Date moduleBuildDate = (Date) kenyaemrInfo.get("buildDate"); moduleVersion += " (" + kenyaui.formatDateTime(moduleBuildDate) + ")"; } model.addAttribute("moduleVersion", moduleVersion); model.addAttribute("systemLocation", Context.getService(KenyaEmrService.class).getDefaultLocation()); model.addAttribute("systemLocationCode", Context.getService(KenyaEmrService.class).getDefaultLocationMflCode()); }
PageHeaderFragmentController { public void controller(FragmentModel model, @SpringBean KenyaUiUtils kenyaui) { Map<String, Object> kenyaemrInfo = ServerInformation.getKenyaemrInformation(); String moduleVersion = (String) kenyaemrInfo.get("version"); boolean isSnapshot = moduleVersion.endsWith("SNAPSHOT"); if (isSnapshot) { Date moduleBuildDate = (Date) kenyaemrInfo.get("buildDate"); moduleVersion += " (" + kenyaui.formatDateTime(moduleBuildDate) + ")"; } model.addAttribute("moduleVersion", moduleVersion); model.addAttribute("systemLocation", Context.getService(KenyaEmrService.class).getDefaultLocation()); model.addAttribute("systemLocationCode", Context.getService(KenyaEmrService.class).getDefaultLocationMflCode()); } }
PageHeaderFragmentController { public void controller(FragmentModel model, @SpringBean KenyaUiUtils kenyaui) { Map<String, Object> kenyaemrInfo = ServerInformation.getKenyaemrInformation(); String moduleVersion = (String) kenyaemrInfo.get("version"); boolean isSnapshot = moduleVersion.endsWith("SNAPSHOT"); if (isSnapshot) { Date moduleBuildDate = (Date) kenyaemrInfo.get("buildDate"); moduleVersion += " (" + kenyaui.formatDateTime(moduleBuildDate) + ")"; } model.addAttribute("moduleVersion", moduleVersion); model.addAttribute("systemLocation", Context.getService(KenyaEmrService.class).getDefaultLocation()); model.addAttribute("systemLocationCode", Context.getService(KenyaEmrService.class).getDefaultLocationMflCode()); }  }
PageHeaderFragmentController { public void controller(FragmentModel model, @SpringBean KenyaUiUtils kenyaui) { Map<String, Object> kenyaemrInfo = ServerInformation.getKenyaemrInformation(); String moduleVersion = (String) kenyaemrInfo.get("version"); boolean isSnapshot = moduleVersion.endsWith("SNAPSHOT"); if (isSnapshot) { Date moduleBuildDate = (Date) kenyaemrInfo.get("buildDate"); moduleVersion += " (" + kenyaui.formatDateTime(moduleBuildDate) + ")"; } model.addAttribute("moduleVersion", moduleVersion); model.addAttribute("systemLocation", Context.getService(KenyaEmrService.class).getDefaultLocation()); model.addAttribute("systemLocationCode", Context.getService(KenyaEmrService.class).getDefaultLocationMflCode()); }  void controller(FragmentModel model,
						   @SpringBean KenyaUiUtils kenyaui); }
PageHeaderFragmentController { public void controller(FragmentModel model, @SpringBean KenyaUiUtils kenyaui) { Map<String, Object> kenyaemrInfo = ServerInformation.getKenyaemrInformation(); String moduleVersion = (String) kenyaemrInfo.get("version"); boolean isSnapshot = moduleVersion.endsWith("SNAPSHOT"); if (isSnapshot) { Date moduleBuildDate = (Date) kenyaemrInfo.get("buildDate"); moduleVersion += " (" + kenyaui.formatDateTime(moduleBuildDate) + ")"; } model.addAttribute("moduleVersion", moduleVersion); model.addAttribute("systemLocation", Context.getService(KenyaEmrService.class).getDefaultLocation()); model.addAttribute("systemLocationCode", Context.getService(KenyaEmrService.class).getDefaultLocationMflCode()); }  void controller(FragmentModel model,
						   @SpringBean KenyaUiUtils kenyaui);  }