Exemplo n.º 1
0
 public void setSyslogEvent(SyslogEvent syslogEvent) {
   if (syslogEvent == null) {
     if (this.triggerType == TRIGGER_TYPE_BASIC)
       throw new IllegalArgumentException(
           "Trigger syslogEvent cannot be NULL if trigger type is BASIC");
     this.syslogEvent = null;
   } else {
     if (this.triggerType == TRIGGER_TYPE_COMPOSITE)
       throw new IllegalArgumentException(
           "Trigger syslogEvent must be NULL if trigger type is COMPOSITE");
     if (this.syslogEvent != null
         && this.syslogEvent.getId().intValue() != syslogEvent.getId().intValue())
       oldSyslogEvent =
           this.syslogEvent; // we do this to remember that we have changed syslog event
     this.syslogEvent = syslogEvent;
   }
 }
Exemplo n.º 2
0
 public boolean isSyslogEventChanged() {
   if (oldSyslogEvent != null
       && this.syslogEvent.getId().intValue() != oldSyslogEvent.getId().intValue()) return true;
   return false;
 }