KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > projector > Information


1 package org.apache.slide.projector;
2
3 import org.apache.slide.projector.i18n.ErrorMessage;
4
5 /**
6  * @version $Revision: 1.2 $
7  */

8
9 public class Information {
10     public final static int DEBUG = 0;
11     public final static int INFO = 1;
12     public final static int WARNING = 2;
13     public final static int ERROR = 3;
14
15     private int severity, number;
16     private ErrorMessage errorMessage;
17     private String JavaDoc[] involvedParameters;
18
19     public Information(int severity, ErrorMessage errorMessage, String JavaDoc[] involvedParameters) {
20         this.severity = severity;
21         this.errorMessage = errorMessage;
22         this.involvedParameters = involvedParameters;
23     }
24
25     public void setNumber(int number) {
26         this.number = number;
27     }
28
29     public int getNumber() {
30         return number;
31     }
32
33     public int getSeverity() {
34         return severity;
35     }
36
37     public ErrorMessage getErrorMessage() {
38         return errorMessage;
39     }
40
41     public String JavaDoc[] getInvolvedParameters() {
42         return involvedParameters;
43     }
44
45     public boolean isParameterInvolved(String JavaDoc paramterName) {
46         for ( int i = 0; i < involvedParameters.length; i++ ) {
47             if ( involvedParameters[i].equals(paramterName) ) return true;
48         }
49         return false;
50     }
51 }
Popular Tags