Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 188 Rev 306
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;
Line 10... Line 11...
10
	private ArrayList<String> messages = null;
11
	private ArrayList<String> deboguages = null;
11
	private ArrayList<Object> donnees = null;
-
 
12
	
12
	private ArrayList<Object> donnees = null;
-
 
13
	
-
 
14
	public Information() {
13
	public Information() {
15
		donnees = new ArrayList<Object>();
Line 14... Line 16...
14
		messages = new ArrayList<String>();
16
		messages = new ArrayList<String>();
15
		donnees = new ArrayList<Object>();
17
		deboguages = new ArrayList<String>();
16
	}
18
	}
-
 
19
 
17
 
20
	public Information(String t) {
18
	public Information(String t) {
21
		donnees = new ArrayList<Object>();
Line 19... Line 22...
19
		donnees = new ArrayList<Object>();
22
		messages = new ArrayList<String>();
20
		messages = new ArrayList<String>();
23
		deboguages = new ArrayList<String>();
21
		type = t;
24
		type = t;
22
	}
25
	}
-
 
26
	
23
	
27
	public Information(String t, String m) {
24
	public Information(String t, String m) {
28
		donnees = new ArrayList<Object>();
Line 25... Line 29...
25
		donnees = new ArrayList<Object>();
29
		messages = new ArrayList<String>();
26
		messages = new ArrayList<String>();
30
		messages.add(m);
Line 34... Line 38...
34
		for(int i = 0 ; i < jsonArray.size() ; i++) {
38
		for(int i = 0 ; i < jsonArray.size() ; i++) {
35
			if (jsonArray.get(i).isString() != null) {
39
			if (jsonArray.get(i).isString() != null) {
36
				messages.add(jsonArray.get(i).isString().stringValue());
40
				messages.add(jsonArray.get(i).isString().stringValue());
37
			}
41
			}
38
		}
42
		}
-
 
43
		deboguages = new ArrayList<String>();
39
		type = t;
44
		type = t;
40
	}
45
	}
Line 41... Line 46...
41
 
46
 
42
	public Information(String t, Object o) {
-
 
43
		messages = new ArrayList<String>();
47
	public Information(String t, Object o) {
44
		donnees = new ArrayList<Object>();
48
		donnees = new ArrayList<Object>();
-
 
49
		donnees.add(o);
-
 
50
		messages = new ArrayList<String>();
45
		donnees.add(o);
51
		deboguages = new ArrayList<String>();
46
		type = t;
52
		type = t;
Line 47... Line 53...
47
	}
53
	}
Line 58... Line 64...
58
		messages.add(message);
64
		messages.add(message);
59
	}
65
	}
60
	public String getMessage(int index) {
66
	public String getMessage(int index) {
61
		return messages.get(index);
67
		return messages.get(index);
62
	}
68
	}
63
	
-
 
64
	public ArrayList<String> getMessages() {
69
	public ArrayList<String> getMessages() {
65
		return messages;
70
		return messages;
66
	}
71
	}
Line -... Line 72...
-
 
72
	
-
 
73
	public void setDeboguage(String messageDeboguage) {
-
 
74
		deboguages.add(messageDeboguage);
-
 
75
	}
-
 
76
	public void setDeboguages(JSONArray jsonArray) {
-
 
77
		for(int i = 0 ; i < jsonArray.size() ; i++) {
-
 
78
			if (jsonArray.get(i).isString() != null) {
-
 
79
				deboguages.add(jsonArray.get(i).isString().stringValue());
-
 
80
			}
-
 
81
		}
-
 
82
	}
-
 
83
	public String getDeboguage(int index) {
-
 
84
		return deboguages.get(index);
-
 
85
	}
-
 
86
	public ArrayList<String> getDeboguages() {
-
 
87
		return deboguages;
-
 
88
	}
67
	
89
	
68
	public void setDonnee(Object objet) {
90
	public void setDonnee(Object objet) {
69
		donnees.add(objet);
91
		donnees.add(objet);
70
	}
92
	}
71
	public void setDonnee(int index, Object objet) {
93
	public void setDonnee(int index, Object objet) {
Line 78... Line 100...
78
			return donnees.get(index);
100
			return donnees.get(index);
79
		} catch (Exception e) {
101
		} catch (Exception e) {
80
			return null;
102
			return null;
81
		}
103
		}
82
	}
104
	}
83
	
-
 
84
	public ArrayList<Object> getDonnees() {
105
	public ArrayList<Object> getDonnees() {
85
		return donnees;
106
		return donnees;
86
	}
107
	}
Line 87... Line 108...
87
 
108