--- projects/cms/source/server/uk/org/iscream/cms/server/client/Alert.java 2001/03/06 01:40:24 1.10 +++ projects/cms/source/server/uk/org/iscream/cms/server/client/Alert.java 2001/03/06 02:33:55 1.11 @@ -8,7 +8,7 @@ import uk.ac.ukc.iscream.util.*; * Alert Object * * @author $Author: ajm $ - * @version $Id: Alert.java,v 1.10 2001/03/06 01:40:24 ajm Exp $ + * @version $Id: Alert.java,v 1.11 2001/03/06 02:33:55 ajm Exp $ */ public class Alert { @@ -17,7 +17,7 @@ public class Alert { /** * The current CVS revision of this class */ - public static final String REVISION = "$Revision: 1.10 $"; + public static final String REVISION = "$Revision: 1.11 $"; public static final int thresholdNORMAL = 0; public static final int thresholdLOWER = 1; @@ -25,6 +25,8 @@ public class Alert { public static final String[] thresholdLevels = {"NORMAL", "LOWER", "UPPER"}; + // not OK and FINAL MUST be present...at the beginning and the end + public static final int alertOK = 0; public static final int alertNOTICE = 1; public static final int alertWARNING = 2; @@ -45,7 +47,7 @@ public class Alert { * * @param level the level of the alert */ - public Alert(int alertLevel, int lastAlert, int thresholdLevel, String source, String thresholdValue, String value, String attributeName, String timeTillNextAlert) { + public Alert(int alertLevel, int lastAlert, int thresholdLevel, String source, String thresholdValue, String value, String attributeName, String timeTillNextAlert, long initialAlertTime) { _alertLevel = alertLevel; _lastAlert = lastAlert; _thresholdLevel = thresholdLevel; @@ -54,6 +56,7 @@ public class Alert { _value = value; _attributeName = attributeName; _timeTillNextAlert = timeTillNextAlert; + _initialAlertTime = initialAlertTime; } //---PUBLIC METHODS--- @@ -112,6 +115,10 @@ public class Alert { public String getTimeTillNextAlert() { return _timeTillNextAlert; } + + public long getInitialAlertTime () { + return _initialAlertTime; + } //---ATTRIBUTES--- @@ -140,6 +147,8 @@ public class Alert { private String _thresholdValue; private String _attributeName; private String _timeTillNextAlert; + + private long _initialAlertTime; //---STATIC ATTRIBUTES---