Examples of RunQC


Examples of uk.ac.bbsrc.tgac.miso.core.data.RunQC

  @Override
  public void generateResponse(Event event) {
    if (event instanceof RunEvent) {
      RunEvent re = (RunEvent)event;
      Run r = re.getEventObject();
      RunQC lastAdded = null;

      List<RunQC> lqc = new ArrayList<RunQC>(r.getRunQCs());
      if (!lqc.isEmpty()) {
        try {
          Collections.sort(lqc, new DateComparator(RunQC.class, "getQcDate"));
          lastAdded = lqc.get(lqc.size()-1);
        }
        catch (NoSuchMethodException e) {
          log.error("Cannot sort list of run QCs", e);
          e.printStackTrace();
        }
      }

      for (User user : r.getWatchers()) {
        Alert a = new DefaultAlert(user);

        String qcInfo = "";
        String qcType = "";

        if (lastAdded != null) {
          qcType = lastAdded.getQcType().getName()+" ";
          qcInfo = "QC'ed by "+lastAdded.getQcCreator()+ " on " + lastAdded.getQcDate() + " ("+lastAdded.getInformation()+"). ";
        }

        a.setAlertTitle(qcType + "Run QC Added : " + r.getAlias());
        a.setAlertText("The following Run has been QCed: "+r.getAlias()+" ("+event.getEventMessage()+"). "+qcInfo+"Please view Run " +r.getId()+ " in MISO for more information.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.