Subversion Repositories eFlore/Applications.del

Rev

Rev 1175 | Rev 1667 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1175 Rev 1496
1
package org.tela_botanica.del.client.modeles;
1
package org.tela_botanica.del.client.modeles;
2
 
2
 
3
import java.util.HashMap;
3
import java.util.HashMap;
4
 
4
 
5
import org.tela_botanica.del.client.i18n.I18n;
5
import org.tela_botanica.del.client.i18n.I18n;
-
 
6
 
6
 
7
 
7
public class Utilisateur {
8
public class Utilisateur {
8
 
9
 
9
	private String nom = "";
10
	private String nom = "";
10
	private String prenom = "";
11
	private String prenom = "";
11
	private String courriel = "";
12
	private String courriel = "";
-
 
13
	private String motDePasseHash = "";
12
	private String id = "0";
14
	private String id = "0";
-
 
15
	private String sessionId = "";
13
	private boolean identifie = false;
16
	private boolean identifie = false;
14
	private HashMap<String, String> preferences = null;
17
	private HashMap<String, String> preferences = null;
15
	
18
	
16
	public Utilisateur(String id) {
19
	public Utilisateur(String sessionId, String id) {
-
 
20
		this.id = id;
17
		this.id = id;
21
		this.sessionId = sessionId;
18
	}
22
	}
19
	
23
	
20
	public Utilisateur(String id, String prenom, String nom, String courriel) {
24
	public Utilisateur(String sessionId, String id, String prenom, String nom, String courriel, String motDePasseHash) {
21
		this(id);
25
		this(sessionId, id);
22
		this.prenom = prenom;
26
		this.prenom = prenom;
23
		this.nom = nom;
27
		this.nom = nom;
24
		this.courriel = courriel;
28
		this.courriel = courriel;
-
 
29
		this.motDePasseHash = motDePasseHash;
25
		identifie = true;
30
		identifie = true;
26
	}
31
	}
-
 
32
	
-
 
33
	public String getMotDePasseHash() {
-
 
34
		return motDePasseHash;
-
 
35
	}
-
 
36
	
-
 
37
	public void setMotDePasseHash(String motDePasseHash) {
-
 
38
		this.motDePasseHash = motDePasseHash;
-
 
39
	}
27
	
40
	
28
	public String getNom() {
41
	public String getNom() {
29
		return nom;
42
		return nom;
30
	}
43
	}
31
	public void setNom(String nom) {
44
	public void setNom(String nom) {
32
		this.nom = nom;
45
		this.nom = nom;
33
	}
46
	}
34
	public String getPrenom() {
47
	public String getPrenom() {
35
		return prenom;
48
		return prenom;
36
	}
49
	}
37
	public void setPrenom(String prenom) {
50
	public void setPrenom(String prenom) {
38
		this.prenom = prenom;
51
		this.prenom = prenom;
39
	}
52
	}
40
	public String getCourriel() {
53
	public String getCourriel() {
41
		return courriel;
54
		return courriel;
42
	}
55
	}
43
	public void setCourriel(String courriel) {
56
	public void setCourriel(String courriel) {
44
		this.courriel = courriel;
57
		this.courriel = courriel;
45
	}
58
	}
46
	public String getId() {
59
	public String getId() {
47
		return id;
60
		return id;
48
	}
61
	}
49
	public void setId(String id) {
62
	public void setId(String id) {
50
		this.id = id;
63
		this.id = id;
51
	}
64
	}
52
	public boolean estIdentifie() {
65
	public boolean estIdentifie() {
53
		return identifie;
66
		return identifie;
54
	}
67
	}
55
	public void setIdentifie(boolean identifie) {
68
	public void setIdentifie(boolean identifie) {
56
		this.identifie = identifie;
69
		this.identifie = identifie;
57
	}
70
	}
58
	
71
	
59
	public String getNomPrenomFormate() {
72
	public String getNomPrenomFormate() {
60
		return identifie ? prenom+" "+nom : I18n.getVocabulary().anonyme();
73
		return identifie ? prenom+" "+nom : I18n.getVocabulary().anonyme();
61
	}
74
	}
62
	
75
	
63
	public HashMap<String, String> getPreferences() {
76
	public HashMap<String, String> getPreferences() {
64
		return preferences;
77
		return preferences;
65
	}
78
	}
66
	
79
	
67
	public void setPreferences(HashMap<String, String> preferences) {
80
	public void setPreferences(HashMap<String, String> preferences) {
68
		this.preferences = preferences;
81
		this.preferences = preferences;
69
	}
82
	}
70
}
83
}