Subversion Repositories eFlore/Applications.coel

Rev

Rev 153 | Rev 188 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 153 Rev 156
Line 6... Line 6...
6
 
6
 
Line 7... Line 7...
7
public class Information {
7
public class Information {
8
	
8
	
-
 
9
	private String type = null;
9
	private String type = null;
10
	private ArrayList<String> messages = null;
10
	private ArrayList<String> messages = null;
11
	private ArrayList<Object> donnees = null;
11
 
12
	
12
	public Information() {
13
	public Information() {
-
 
14
		messages = new ArrayList<String>();
-
 
15
	}
-
 
16
 
-
 
17
	public Information(String t) {
Line 13... Line 18...
13
		messages = new ArrayList<String>();
18
		type = t;
14
	}
19
	}
15
	
20
	
16
	public Information(String t, String m) {
21
	public Information(String t, String m) {
Line 27... Line 32...
27
			}
32
			}
28
		}
33
		}
29
		type = t;
34
		type = t;
30
	}
35
	}
Line -... Line 36...
-
 
36
 
-
 
37
	public Information(String t, Object o) {
-
 
38
		donnees = new ArrayList<Object>();
-
 
39
		donnees.add(o);
-
 
40
		type = t;
-
 
41
	}
-
 
42
	
31
 
43
 
32
	public void setType(String t) {
44
	public void setType(String t) {
33
		type = t;
45
		type = t;
34
	}
46
	}
35
	public String getType() {
47
	public String getType() {
Line 44... Line 56...
44
	}
56
	}
Line 45... Line 57...
45
	
57
	
46
	public ArrayList<String> getMessages() {
58
	public ArrayList<String> getMessages() {
47
		return messages;
59
		return messages;
-
 
60
	}
-
 
61
	
-
 
62
	public void setDonnee(Object objet) {
-
 
63
		donnees.add(objet);
-
 
64
	}
-
 
65
	public Object getDonnee(int index) {
-
 
66
		return donnees.get(index);
-
 
67
	}
-
 
68
	
-
 
69
	public ArrayList<Object> getDonnees() {
-
 
70
		return donnees;
Line 48... Line 71...
48
	}
71
	}
49
 
72
 
-
 
73
	public String toString() {
50
	public String toString() {
74
		String chaine = new String();
51
		String chaine = new String();
75
		if (messages != null) {
52
		for(int i = 0 ; i < messages.size() ; i++) {
76
			for(int i = 0 ; i < messages.size() ; i++) {
-
 
77
				// GXT ne prend pas en compte /n ou /r/n...
53
			// GXT ne prend pas en compte /n ou /r/n...
78
				chaine += getMessage(i)+"\n";
54
			chaine += getMessage(i)+"\n";
79
			}
55
		}
80
		}
56
		return chaine;
81
		return chaine;