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.3 by ajm, Fri Mar 2 00:08:17 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 20 | Line 20 | class Alert {
20      public static final String REVISION = "$Revision$";
21      
22      // DEFINE MORE ALERT LEVELS HERE
23 <    public static final int OK = "0";
23 >    public static final int OK = 0;
24 >    public static final int WARNING = 1;
25 >    public static final int FATAL = 2;
26      
27 +    public static final String[] alerts = {"OK", "WARNING", "FATAL"};
28 +    
29   //---STATIC METHODS---
30  
31   //---CONSTRUCTORS---
# Line 31 | Line 35 | class Alert {
35       *
36       * @param level the level of the alert
37       */
38 <    public Alert(int level) {
38 >    public Alert(int level, String thresholdValue, String value, String attributeName) {
39          _level = level;
40 +        _thresholdValue = thresholdValue;
41 +        _value = value;
42 +        _attributeName = attributeName;
43      }
44  
45   //---PUBLIC METHODS---
# Line 56 | Line 63 | class Alert {
63   //---PRIVATE METHODS---
64  
65   //---ACCESSOR/MUTATOR METHODS---
66 +    
67 +    /**
68 +     * Returns the level of this packet
69 +     */
70 +    public int getLevel() {
71 +        return _level;
72 +    }
73 +    
74 +    public String getValue() {
75 +        return _value;
76 +    }
77 +    
78 +    public String getThresholdValue() {
79 +        return _thresholdValue;
80 +    }
81 +    
82 +    public String getAttributeName() {
83 +        return _attributeName;
84 +    }
85  
86   //---ATTRIBUTES---
87  
# Line 74 | Line 100 | class Alert {
100       * The alert level of this packet
101       */
102      private int _level;
103 +    
104 +    private String _value;
105 +    private String _thresholdValue;
106 +    private String _attributeName;
107  
108   //---STATIC ATTRIBUTES---
109  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines