InterAgentOperatingMode iaom = new InterAgentOperatingMode("org.cougaar.core.security.monitoring.THREATCON_LEVEL", list);   if(level.equalsIgnoreCase("HIGH")) iaom.setValue(new Integer(HIGH)); else iaom.setValue(new Integer(LOW)); iaom.setTarget(MessageAddress.getMessageAddress(target)); boolean temp = modeExists(iaom); if(modeExists(iaom)) { publishMode(iaom, "change"); } else { publishMode(iaom, "add");
InterAgentOperatingMode threatcon = getThreatcon(); if (threatcon == null) { threatcon = new InterAgentOperatingMode("org.cougaar.core.security.monitoring.THREATCON_LEVEL", list); setThreatLevel(threatcon, level); threatcon.setUID(uidService.nextUID()); threatcon.setTarget(MessageAddress.getMessageAddress(target)); publishThreatcon(threatcon, "add"); } else { setThreatLevel(threatcon, level); publishThreatcon(threatcon, "change");
    private void submit() {      OMCRangeList list = new OMCRangeList(new Integer(LOW), new Integer(HIGH));      InterAgentOperatingMode iaom = new InterAgentOperatingMode("org.cougaar.core.security.monitoring.THREATCON_LEVEL", list);      //MessageAddress target = MessageAddress.getMessageAddress("SMALL-ARManager");      //iaom.setTarget(target);      if(level.equalsIgnoreCase("HIGH"))        iaom.setValue(new Integer(HIGH));      else        iaom.setValue(new Integer(LOW));      iaom.setTarget(MessageAddress.getMessageAddress(target));      boolean temp = modeExists(iaom);      if(modeExists(iaom)) {         publishMode(iaom, "change");      }      else {         publishMode(iaom, "add");      }    }