@Override public AlarmEvent evaluate(AlarmPoint alarm,String trigger){
  if (trigger.equals(AlarmPoint.TRIGGER_ACTIVATE)) {
    return activation(alarm);
  }
 else   if (trigger.equals(AlarmPoint.TRIGGER_DEACTIVATE)) {
    return deactivation(alarm);
  }
 else   if (trigger.equals(AlarmPoint.TRIGGER_ACKNOWLEDGE)) {
    return acknowledge(alarm);
  }
 else   if (trigger.equals(AlarmPoint.TRIGGER_BLOCK)) {
    return block(alarm);
  }
 else   if (trigger.equals(AlarmPoint.TRIGGER_UNBLOCK)) {
    return unblock(alarm);
  }
 else   if (trigger.equals(AlarmPoint.TRIGGER_ENABLE)) {
    return enable(alarm);
  }
 else   if (trigger.equals(AlarmPoint.TRIGGER_DISABLE)) {
    return disable(alarm);
  }
 else {
    throw new IllegalArgumentException("'" + trigger + "' is not supported by this AlarmModel.");
  }
}

@ Override public AlarmEvent evaluate ( AlarmPoint alarm , String trigger ) { if ( trigger . equals ( AlarmPoint . TRIGGER_ACTIVATE ) ) { return activation ( alarm ) ; } else if ( trigger . equals ( AlarmPoint . TRIGGER_DEACTIVATE ) ) { return deactivation ( alarm ) ; } else if ( trigger . equals ( AlarmPoint . TRIGGER_ACKNOWLEDGE ) ) { return acknowledge ( alarm ) ; } else if ( trigger . equals ( AlarmPoint . TRIGGER_BLOCK ) ) { return block ( alarm ) ; } else if ( trigger . equals ( AlarmPoint . TRIGGER_UNBLOCK ) ) { return unblock ( alarm ) ; } else if ( trigger . equals ( AlarmPoint . TRIGGER_ENABLE ) ) { return enable ( alarm ) ; } else if ( trigger . equals ( AlarmPoint . TRIGGER_DISABLE ) ) { return disable ( alarm ) ; } else { throw new IllegalArgumentException ( "'" + trigger + "' is not supported by this AlarmModel." ) ; } }
execute the required changes upon an alarmtrigger . the alarmsystem calls this method , for the alarmstatus in the the alarmpoint to be updated , as well as an alarmevent to be created .
