Package uk.ac.bbsrc.tgac.miso.core.event.impl

Examples of uk.ac.bbsrc.tgac.miso.core.event.impl.DefaultAlert


          if (rs.getLong("userId") == LimsUtils.SYSTEM_USER_ID) {
            a = new SystemAlert();
          }
          else {
            User u = securityManager.getUserById(rs.getLong("userId"));
            a = new DefaultAlert(u);
          }
          a.setAlertId(id);
          a.setAlertTitle(rs.getString("title"));
          a.setAlertText(rs.getString("text"));
          a.setAlertRead(rs.getBoolean("isRead"));
View Full Code Here


    if (event instanceof ProjectOverviewEvent) {
      ProjectOverviewEvent re = (ProjectOverviewEvent)event;
      ProjectOverview po = re.getEventObject();

      for (User user : po.getWatchers()) {
        Alert a = new DefaultAlert(user);
        a.setAlertTitle("All runs have now completed for project " + po.getProject().getAlias() + "(" + po.getProject().getName() + ")");
        a.setAlertText("The following runs associated with this Project have been completed: "+po.getProject().getAlias()+" ("+event.getEventMessage()+"). Please view Project " +po.getProject().getProjectId() + " in MISO for more information");

        for (AlerterService as : alerterServices) {
          try {
            as.raiseAlert(a);
          }
View Full Code Here

      ProjectOverview po = re.getEventObject();

      for (User user : po.getWatchers()) {
        log.info("Responding to " + user.getLoginName());

        Alert a = new DefaultAlert(user);
        a.setAlertTitle("Pool construction complete for project " + po.getProject().getAlias() + "(" + po.getProject().getName() + ")");
        a.setAlertText("The following Project's Pools have been prepared and are ready to run: "+po.getProject().getAlias()+" ("+event.getEventMessage()+"). Please view Project " +po.getProject().getProjectId() + " in MISO for more information");

        for (AlerterService as : alerterServices) {
          try {
            as.raiseAlert(a);
          }
View Full Code Here

          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.");

        for (AlerterService as : alerterServices) {
          try {
            as.raiseAlert(a);
          }
View Full Code Here

    if (event instanceof ProjectOverviewEvent) {
      ProjectOverviewEvent re = (ProjectOverviewEvent)event;
      ProjectOverview po = re.getEventObject();

      for (User user : po.getWatchers()) {
        Alert a = new DefaultAlert(user);
        a.setAlertTitle("Primary analysis for project " + po.getProject().getAlias() + "(" + po.getProject().getName() + ")");
        a.setAlertText("The primary analysis related to this Project has completed: "+po.getProject().getAlias()+" ("+event.getEventMessage()+"). Please view Project " +po.getProject().getProjectId() + " in MISO for more information");

        for (AlerterService as : alerterServices) {
          try {
            as.raiseAlert(a);
          }
View Full Code Here

    if (event instanceof RunEvent) {
      RunEvent re = (RunEvent)event;
      Run r = re.getEventObject();

      for (User user : r.getWatchers()) {
        Alert a = new DefaultAlert(user);
        a.setAlertLevel(AlertLevel.CRITICAL);
        a.setAlertTitle("Run Failed: " + r.getAlias());
        a.setAlertText("The following Run has been set to FAILED: "+r.getAlias()+" ("+event.getEventMessage()+"). Please view Run " +r.getId()+ " in MISO for more information");

        for (AlerterService as : alerterServices) {
          try {
            as.raiseAlert(a);
          }
View Full Code Here

      ProjectOverview po = re.getEventObject();

      for (User user : po.getWatchers()) {
        log.debug("Responding to " + user.getLoginName());

        Alert a = new DefaultAlert(user);
        a.setAlertTitle("All Library QCs passed for project " + po.getProject().getAlias() + "(" + po.getProject().getName() + ")");
        a.setAlertText("The following Project's Libraries have been QC'ed successfully: "+po.getProject().getAlias()+" ("+event.getEventMessage()+"). Please view Project " +po.getProject().getProjectId() + " in MISO for more information");

        for (AlerterService as : getAlerterServices()) {
          try {
            as.raiseAlert(a);
          }
View Full Code Here

      ProjectOverview po = re.getEventObject();

      for (User user : po.getWatchers()) {
        log.info("Responding to " + user.getLoginName());

        Alert a = new DefaultAlert(user);
        a.setAlertTitle("Library preparation complete for project " + po.getProject().getAlias() + "(" + po.getProject().getName() + ")");
        a.setAlertText("The following Project's Libraries have been prepared: "+po.getProject().getAlias()+" ("+event.getEventMessage()+"). Please view Project " +po.getProject().getProjectId() + " in MISO for more information");

        for (AlerterService as : alerterServices) {
          try {
            as.raiseAlert(a);
          }
View Full Code Here

      Pool p = pe.getEventObject();

      for (User user : p.getWatchers()) {
        log.info("Responding to " + user.getLoginName());

        Alert a = new DefaultAlert(user);
        //TODO change to p.getAlias() when added
        a.setAlertTitle("Pool " + p.getName() + "(" + p.getId() + ")");
        a.setAlertText("The following Pool is ready to run: "+p.getName()+" ("+event.getEventMessage()+"). Please view Pool " +p.getId() + " in MISO for more information");

        for (AlerterService as : alerterServices) {
          try {
            as.raiseAlert(a);
          }
View Full Code Here

      ProjectOverview po = re.getEventObject();

      for (User user : po.getWatchers()) {
        log.info("Responding to " + user.getLoginName());

        Alert a = new DefaultAlert(user);
        a.setAlertTitle("All Sample QCs passed for project " + po.getProject().getAlias() + "("+po.getProject().getName()+")");
        a.setAlertText("The following Project's Samples have been QC'ed successfully: "+po.getProject().getAlias()+" ("+event.getEventMessage()+"). Please view Project " +po.getProject().getProjectId() + " in MISO for more information");

        for (AlerterService as : alerterServices) {
          try {
            as.raiseAlert(a);
          }
View Full Code Here

TOP

Related Classes of uk.ac.bbsrc.tgac.miso.core.event.impl.DefaultAlert

Copyright © 2018 www.massapicom. 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.