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.1 by tdb, Wed Feb 28 00:00:04 2001 UTC vs.
Revision 1.8 by ajm, Sun Mar 4 02:41:16 2001 UTC

# Line 10 | Line 10 | import uk.ac.ukc.iscream.util.*;
10   * @author  $Author$
11   * @version $Id$
12   */
13 < class Alert {
13 > public class Alert {
14  
15   //---FINAL ATTRIBUTES---
16  
# Line 18 | Line 18 | 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";
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 +    
34 +    public static final String[] alertLevels = {"OK", "NOTICE", "WARNING", "CAUTION", "CRITICAL"};
35 +    
36   //---STATIC METHODS---
37  
38   //---CONSTRUCTORS---
# Line 31 | Line 42 | class Alert {
42       *
43       * @param level the level of the alert
44       */
45 <    public Alert(int level) {
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 56 | Line 73 | class Alert {
73   //---PRIVATE METHODS---
74  
75   //---ACCESSOR/MUTATOR METHODS---
76 +    
77 +    /**
78 +     * Returns the level of this packet
79 +     */
80 +    public int getLevel() {
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 +    }
95 +    
96 +    public String getThresholdValue() {
97 +        return _thresholdValue;
98 +    }
99 +    
100 +    public String getAttributeName() {
101 +        return _attributeName;
102 +    }
103 +    
104 +    public String getTimeTillNextAlert() {
105 +        return _timeTillNextAlert;
106 +    }
107  
108   //---ATTRIBUTES---
109  
# Line 73 | Line 121 | 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