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.3 by ajm, Fri Mar 2 00:08:17 2001 UTC vs.
Revision 1.8 by ajm, Sun Mar 4 02:41:16 2001 UTC

# Line 18 | Line 18 | public class Alert {
18       * The current CVS revision of this class
19       */
20      public static final String REVISION = "$Revision$";
21 +
22 +    public static final int thresholdNORMAL = 0;
23 +    public static final int thresholdLOWER = 1;
24 +    public static final int thresholdUPPER = 2;
25      
26 <    // DEFINE MORE ALERT LEVELS HERE
23 <    public static final int OK = 0;
24 <    public static final int WARNING = 1;
25 <    public static final int FATAL = 2;
26 >    public static final String[] thresholdLevels = {"NORMAL", "LOWER", "UPPER"};
27      
28 <    public static final String[] alerts = {"OK", "WARNING", "FATAL"};
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      
34 +    public static final String[] alertLevels = {"OK", "NOTICE", "WARNING", "CAUTION", "CRITICAL"};
35 +    
36   //---STATIC METHODS---
37  
38   //---CONSTRUCTORS---
# Line 35 | Line 42 | public class Alert {
42       *
43       * @param level the level of the alert
44       */
45 <    public Alert(int level, String thresholdValue, String value, String attributeName) {
46 <        _level = level;
45 >    public Alert(int alertLevel, int thresholdLevel, String source, String thresholdValue, String value, String attributeName, String timeTillNextAlert) {
46 >        _alertLevel = alertLevel;
47 >        _thresholdLevel = thresholdLevel;
48 >        _source = source;
49          _thresholdValue = thresholdValue;
50          _value = value;
51          _attributeName = attributeName;
52 +        _timeTillNextAlert = timeTillNextAlert;
53      }
54  
55   //---PUBLIC METHODS---
# Line 68 | Line 78 | public class Alert {
78       * Returns the level of this packet
79       */
80      public int getLevel() {
81 <        return _level;
81 >        return _alertLevel;
82      }
83      
84 +    public int getThreshold() {
85 +        return _thresholdLevel;
86 +    }
87 +    
88 +    public String getSource() {
89 +        return _source;
90 +    }
91 +    
92      public String getValue() {
93          return _value;
94      }
# Line 82 | Line 100 | public class Alert {
100      public String getAttributeName() {
101          return _attributeName;
102      }
103 +    
104 +    public String getTimeTillNextAlert() {
105 +        return _timeTillNextAlert;
106 +    }
107  
108   //---ATTRIBUTES---
109  
# Line 99 | Line 121 | public class Alert {
121      /**
122       * The alert level of this packet
123       */
124 <    private int _level;
124 >    private int _alertLevel;
125      
126 +    private int _thresholdLevel;
127 +    
128 +    private String _source;
129      private String _value;
130      private String _thresholdValue;
131      private String _attributeName;
132 +    private String _timeTillNextAlert;
133  
134   //---STATIC ATTRIBUTES---
135  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines