IlpAttribute NewMajorAlarmAttribute = new IltComputedAttribute("newMajorAlarmAttribute", String.class) { public Object getValue (IlpAttributeValueHolder h) { IltObjectState oState = (IltObjectState)h.getAttributeValue(IltObject.ObjectStateAttribute); IltAlarm.State alarmState = oState == null ? null : (IltAlarm.State)oState.getAlarmState(); if ( alarmState == null ) return null; return alarmState.getNewAlarmCount(IltAlarm.Severity.Major); } public boolean isDependentOn (IlpAttribute a) { return a.getName().equals(ObjectStateAttribute.getName()); } };