Subversion Repositories eFlore/Applications.del

Rev

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

Rev 1496 Rev 1667
Line 2... Line 2...
2
 
2
 
Line 3... Line 3...
3
import java.util.HashMap;
3
import java.util.HashMap;
Line -... Line 4...
-
 
4
 
-
 
5
import org.tela_botanica.del.client.i18n.I18n;
Line 4... Line 6...
4
 
6
 
Line 5... Line 7...
5
import org.tela_botanica.del.client.i18n.I18n;
7
import com.google.gwt.core.shared.GWT;
6
 
8
 
7
 
9
 
8
public class Utilisateur {
10
public class Utilisateur {
9
 
11
 
10
	private String nom = "";
12
	private String nom = "";
-
 
13
	private String prenom = "";
11
	private String prenom = "";
14
	private String courriel = "";
12
	private String courriel = "";
15
	private String motDePasseHash = "";
Line 13... Line 16...
13
	private String motDePasseHash = "";
16
	private String id = "0";
14
	private String id = "0";
17
	private String sessionId = "";
15
	private String sessionId = "";
18
	private String adminNiveau = "0";
16
	private boolean identifie = false;
19
	private boolean identifie = false;
Line 17... Line 20...
17
	private HashMap<String, String> preferences = null;
20
	private HashMap<String, String> preferences = null;
-
 
21
	
18
	
22
	public Utilisateur(String sessionId, String id) {
19
	public Utilisateur(String sessionId, String id) {
23
		this.id = id;
20
		this.id = id;
24
		this.sessionId = sessionId;
21
		this.sessionId = sessionId;
25
	}
22
	}
26
	
-
 
27
	public Utilisateur(String sessionId, String id, String prenom, String nom, String courriel, 
23
	
28
			String motDePasseHash, String adminNiveau) {
24
	public Utilisateur(String sessionId, String id, String prenom, String nom, String courriel, String motDePasseHash) {
29
		this(sessionId, id);
Line 25... Line 30...
25
		this(sessionId, id);
30
		this.prenom = prenom;
26
		this.prenom = prenom;
31
		this.nom = nom;
Line 78... Line 83...
78
	}
83
	}
Line 79... Line 84...
79
	
84
	
80
	public void setPreferences(HashMap<String, String> preferences) {
85
	public void setPreferences(HashMap<String, String> preferences) {
81
		this.preferences = preferences;
86
		this.preferences = preferences;
-
 
87
	}
-
 
88
	
-
 
89
	public boolean etreAdmin() {
-
 
90
		return this.adminNiveau.equals("2") ? true : false;
-
 
91
	}
-
 
92
	
-
 
93
	public String toString() {
-
 
94
		String utilisateur = id + "\n" + nom + "\n" + prenom + "\n" + courriel + "\n" + motDePasseHash + "\n" + 
-
 
95
			sessionId + "\n" + adminNiveau + "\n";
-
 
96
		return utilisateur;
82
	}
97
	}