Subversion Repositories eFlore/Applications.coel

Rev

Rev 153 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
133 jpm 1
package org.tela_botanica.client.modeles;
2
 
3
import java.util.ArrayList;
4
 
5
public class Information {
6
 
7
	private String type = null;
8
	private ArrayList<String> messages = null;
9
 
10
	public Information() {
11
		messages = new ArrayList<String>();
12
	}
13
 
14
	public Information(String t, String m) {
15
		messages = new ArrayList<String>();
16
		messages.add(m);
17
		type = t;
18
	}
19
 
20
	public void setType(String t) {
21
		type = t;
22
	}
23
	public String getType() {
24
		return type;
25
	}
26
 
27
	public void setMessage(String message) {
28
		messages.add(message);
29
	}
30
	public String getMessage(int index) {
31
		return messages.get(index);
32
	}
33
 
34
	public ArrayList<String> getMessages() {
35
		return messages;
36
	}
37
 
38
	public String toString() {
39
		String chaine = new String();
40
		for(int i = 0 ; i < messages.size() ; i++) {
41
			// GXT ne prend pas en compte /n ou /r/n...
42
			chaine += getMessage(i)+"<br />";
43
		}
44
		return chaine;
45
	}
46
}