protected String getSiteLogo() { if (ConfigurationProperties.getInstance() .isPropertyValueEqual(Property.configurationName, "Haiti LNSP")) { return "images" + File.separator + "HaitiLNSP.jpg"; } return null; }
@Override protected void createReportParameters() { super.createReportParameters(); reportParameters.put("activityLabel", getActivityLabel()); reportParameters.put( "accessionPrefix", AccessionNumberUtil.getAccessionNumberValidator().getPrefix()); reportParameters.put( "labNumberTitle", StringUtil.getContextualMessageForKey("quick.entry.accession.number")); reportParameters.put( "labName", ConfigurationProperties.getInstance().getPropertyValue(Property.SiteName)); reportParameters.put("siteLogo", getSiteLogo()); reportParameters.put("SUBREPORT_DIR", reportPath); reportParameters.put("startDate", dateRange.getLowDateStr()); reportParameters.put("endDate", dateRange.getHighDateStr()); reportParameters.put("isReportByTest", isReportByTest()); }
@SuppressWarnings("unchecked") private static List<IdValuePair> createSortedQAEvents() { List<IdValuePair> qaEvents = new ArrayList<IdValuePair>(); QaEventDAO qaEventDAO = new QaEventDAOImpl(); List<QaEvent> qaEventList = qaEventDAO.getAllQaEvents(); boolean sortList = ConfigurationProperties.getInstance() .isPropertyValueEqual(Property.QA_SORT_EVENT_LIST, "true"); if (sortList) { Collections.sort( qaEventList, new Comparator<QaEvent>() { @Override public int compare(QaEvent o1, QaEvent o2) { return o1.getLocalizedName().compareTo(o2.getLocalizedName()); } }); } QaEvent otherQaEvent = null; // Put the "Other" type of event at the bottom of the list. for (QaEvent event : qaEventList) { if (sortList && "Other".equals(event.getQaEventName())) { otherQaEvent = event; } else { qaEvents.add(new IdValuePair(event.getId(), event.getLocalizedName())); } } if (otherQaEvent != null) { qaEvents.add(new IdValuePair(otherQaEvent.getId(), otherQaEvent.getLocalizedName())); } return qaEvents; }