ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/server/uk/org/iscream/cms/server/client/Alert.java
(Generate patch)

Comparing projects/cms/source/server/uk/org/iscream/cms/server/client/Alert.java (file contents):
Revision 1.7 by ajm, Fri Mar 2 05:42:38 2001 UTC vs.
Revision 1.10 by ajm, Tue Mar 6 01:40:24 2001 UTC

# Line 19 | Line 19 | public class Alert {
19       */
20      public static final String REVISION = "$Revision$";
21  
22 <    public static final int OK = 0;
23 <    public static final int WARNING = 1;
24 <    public static final int CRITICAL = 2;
22 >    public static final int thresholdNORMAL = 0;
23 >    public static final int thresholdLOWER = 1;
24 >    public static final int thresholdUPPER = 2;
25      
26 <    public static final String[] alerts = {"OK", "WARNING", "CRITICAL"};
26 >    public static final String[] thresholdLevels = {"NORMAL", "LOWER", "UPPER"};
27      
28 +    public static final int alertOK = 0;
29 +    public static final int alertNOTICE = 1;
30 +    public static final int alertWARNING = 2;
31 +    public static final int alertCAUTION = 3;
32 +    public static final int alertCRITICAL = 4;
33 +    // note FINAL should be the highest alert
34 +    public static final int alertFINAL = 5;
35 +    
36 +    // note FINAL should be last in this list
37 +    public static final String[] alertLevels = {"OK", "NOTICE", "WARNING", "CAUTION", "CRITICAL", "FINAL"};
38 +    
39   //---STATIC METHODS---
40  
41   //---CONSTRUCTORS---
# Line 34 | Line 45 | public class Alert {
45       *
46       * @param level the level of the alert
47       */
48 <    public Alert(int level, String source, String thresholdValue, String value, String attributeName) {
49 <        _level = level;
48 >    public Alert(int alertLevel, int lastAlert, int thresholdLevel, String source, String thresholdValue, String value, String attributeName, String timeTillNextAlert) {
49 >        _alertLevel = alertLevel;
50 >        _lastAlert = lastAlert;
51 >        _thresholdLevel = thresholdLevel;
52          _source = source;
53          _thresholdValue = thresholdValue;
54          _value = value;
55          _attributeName = attributeName;
56 +        _timeTillNextAlert = timeTillNextAlert;
57      }
58  
59   //---PUBLIC METHODS---
# Line 68 | Line 82 | public class Alert {
82       * Returns the level of this packet
83       */
84      public int getLevel() {
85 <        return _level;
85 >        return _alertLevel;
86      }
87      
88 +    public int getLastLevel() {
89 +        return _lastAlert;
90 +    }
91 +    
92 +    public int getThreshold() {
93 +        return _thresholdLevel;
94 +    }
95 +    
96      public String getSource() {
97          return _source;
98      }
# Line 86 | Line 108 | public class Alert {
108      public String getAttributeName() {
109          return _attributeName;
110      }
111 +    
112 +    public String getTimeTillNextAlert() {
113 +        return _timeTillNextAlert;
114 +    }
115  
116   //---ATTRIBUTES---
117  
# Line 103 | Line 129 | public class Alert {
129      /**
130       * The alert level of this packet
131       */
132 <    private int _level;
132 >    private int _alertLevel;
133      
134 +    private int _lastAlert;
135 +    
136 +    private int _thresholdLevel;
137 +    
138      private String _source;
139      private String _value;
140      private String _thresholdValue;
141      private String _attributeName;
142 +    private String _timeTillNextAlert;
143  
144   //---STATIC ATTRIBUTES---
145  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines