use of cern.laser.console.CommentedAlarmMap in project ACS by ACS-Community.
the class ConfigurationImpl method buildCommentedAlarmMap.
//
// -- PROTECTED METHODS -------------------------------------------
//
//
// -- PRIVATE METHODS ---------------------------------------------
//
private CommentedAlarmMap buildCommentedAlarmMap(Collection commentedAlarmRefs, boolean removeChanged) throws Exception {
CommentedAlarmMap result = new CommentedAlarmMap();
if ((commentedAlarmRefs == null) || (commentedAlarmRefs.size() == 0)) {
return result;
}
Iterator iterator = commentedAlarmRefs.iterator();
while (iterator.hasNext()) {
CommentedAlarmRef ref = (CommentedAlarmRef) iterator.next();
Alarm alarm = AlarmBrowsingHandler.get(orb, logger).getAlarmById(ref.getAlarmId());
if ((!removeChanged) || (removeChanged && alarm.getStatus().getSourceTimestamp().equals(ref.getSourceTimestamp()))) {
result.put(new CommentedAlarm(alarm, ref.getComment()));
}
}
return result;
}
Aggregations