Package uk.ac.bbsrc.tgac.miso.core.data

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


  public void raiseSystemAlert(Event event) {
    raiseSystemAlert(event, DaoAlerterService.class);
  }

  protected void raiseSystemAlert(Event event, Class<? extends AlerterService> ... servicesToAlert) {
    Watchable o = (Watchable)event.getEventObject();

    Alert a = new SystemAlert();
    a.setAlertTitle("[" + o.getWatchableIdentifier() + "] " + event.getEventType().name());
    a.setAlertText(event.getEventMessage());

    List<Class<? extends AlerterService>> serviceList = Arrays.asList(servicesToAlert);
    for (AlerterService as : alerterServices) {
      if (serviceList.contains(as.getClass())) {
View Full Code Here


    }
  }

  @Override
  public void generateResponse(Event event) {
    Watchable o = (Watchable) event.getEventObject();

    for (User user : o.getWatchers()) {
      Alert a = new DefaultAlert(user);
      a.setAlertTitle("Raising alert on object");
      a.setAlertText("The object " + o.toString() + " produced an event " + event.getEventType() + ":: " + event.getEventMessage());

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

TOP

Related Classes of uk.ac.bbsrc.tgac.miso.core.data.Watchable

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.