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.5 by tdb, Fri Mar 2 00:35:50 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 OK = 0;
23 +    public static final int WARNING = 1;
24 +    public static final int FATAL = 2;
25      
26 <    // DEFINE MORE ALERT LEVELS HERE
23 <    public static final int OK = "0";
26 >    public static final String[] alerts = {"OK", "WARNING", "FATAL"};
27      
28   //---STATIC METHODS---
29  
# Line 31 | Line 34 | class Alert {
34       *
35       * @param level the level of the alert
36       */
37 <    public Alert(int level) {
37 >    public Alert(int level, String source, String thresholdValue, String value, String attributeName) {
38          _level = level;
39 +        _source = source;
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 getSource() {
75 +        return _source;
76 +    }
77 +    
78 +    public String getValue() {
79 +        return _value;
80 +    }
81 +    
82 +    public String getThresholdValue() {
83 +        return _thresholdValue;
84 +    }
85 +    
86 +    public String getAttributeName() {
87 +        return _attributeName;
88 +    }
89  
90   //---ATTRIBUTES---
91  
# Line 74 | Line 104 | class Alert {
104       * The alert level of this packet
105       */
106      private int _level;
107 +    
108 +    private String _source;
109 +    private String _value;
110 +    private String _thresholdValue;
111 +    private String _attributeName;
112  
113   //---STATIC ATTRIBUTES---
114  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines