Subversion Repositories eFlore/Applications.del

Rev

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

Rev 579 Rev 814
1
package org.tela_botanica.del.client.cache;
1
package org.tela_botanica.del.client.cache;
-
 
2
 
-
 
3
import java.util.List;
2
 
4
 
3
import org.tela_botanica.del.client.modeles.Image;
5
import org.tela_botanica.del.client.modeles.Image;
4
import org.tela_botanica.del.client.modeles.InformationsRecherche;
6
import org.tela_botanica.del.client.modeles.InformationsRecherche;
5
import org.tela_botanica.del.client.modeles.Observation;
7
import org.tela_botanica.del.client.modeles.Observation;
6
import org.tela_botanica.del.client.modeles.Protocole;
8
import org.tela_botanica.del.client.modeles.Protocole;
7
import org.tela_botanica.del.client.modeles.Utilisateur;
9
import org.tela_botanica.del.client.modeles.Utilisateur;
8
import com.google.gwt.user.client.Window;
-
 
9
 
10
 
10
public class CacheClient {
11
public class CacheClient {
-
 
12
 
-
 
13
	private List<Protocole> listeProtocoles;
11
 
14
	
12
	private Observation observationCourante;
15
	private Observation observationCourante;
13
	private Image imageCourante;
16
	private Image imageCourante;
14
	private String taxonPourRechercheEflore;
17
	private String taxonPourRechercheEflore;
15
	private Protocole protocoleCourant;
18
	private Protocole protocoleCourant;
16
	private int numPageRechercheImage = 0;
19
	private int numPageRechercheImage = 0;
17
	private int nbTotalImagesRecherchees = 0;
20
	private int nbTotalImagesRecherchees = 0;
18
 
21
 
19
	private int pasPagination = 12;
22
	private int pasPagination = 12;
20
	private int pageCouranteRechercheImage = 1;
23
	private int pageCouranteRechercheImage = 1;
21
	private int pageCouranteRechercheObservations = 1;
24
	private int pageCouranteRechercheObservations = 1;
22
	private InformationsRecherche informationsRechercheImage;
25
	private InformationsRecherche informationsRechercheImage;
23
	private InformationsRecherche informationsRechercheObservation;
26
	private InformationsRecherche informationsRechercheObservation;
24
	private Utilisateur utilisateur;
27
	private Utilisateur utilisateur;
25
 
28
 
26
	private static CacheClient instance;
29
	private static CacheClient instance;
27
 
30
 
28
	private CacheClient() {
31
	private CacheClient() {
29
		instance = this;
32
		instance = this;
30
	}
33
	}
31
 
34
 
32
	public Utilisateur getUtilisateur() {
35
	public Utilisateur getUtilisateur() {
33
		if (this.utilisateur == null) {
36
		if (this.utilisateur == null) {
34
			this.utilisateur = new Utilisateur(null);
37
			this.utilisateur = new Utilisateur(null);
35
		}
38
		}
36
		return this.utilisateur;
39
		return this.utilisateur;
37
	}
40
	}
38
	
41
	
39
	public void setUtilisateur(Utilisateur utilisateur) {
42
	public void setUtilisateur(Utilisateur utilisateur) {
40
		this.utilisateur = utilisateur; 
43
		this.utilisateur = utilisateur; 
41
	}
44
	}
42
	
45
	
43
	public Observation getObservationCourante() {
46
	public Observation getObservationCourante() {
44
		return observationCourante;
47
		return observationCourante;
45
	}
48
	}
46
 
49
 
47
	public void setObservationCourante(Observation observationCourante) {
50
	public void setObservationCourante(Observation observationCourante) {
48
		this.observationCourante = observationCourante;
51
		this.observationCourante = observationCourante;
49
	}
52
	}
50
 
53
 
51
	public static CacheClient getInstance() {
54
	public static CacheClient getInstance() {
52
		if (instance == null) {
55
		if (instance == null) {
53
			instance = new CacheClient();
56
			instance = new CacheClient();
54
		}
57
		}
55
		return instance;
58
		return instance;
56
	}
59
	}
57
 
60
 
58
	public String getTaxonPourRechercheEflore() {
61
	public String getTaxonPourRechercheEflore() {
59
		return taxonPourRechercheEflore;
62
		return taxonPourRechercheEflore;
60
	}
63
	}
61
 
64
 
62
	public void setTaxonPourRechercheEflore(String taxonPourRechercheEflore) {
65
	public void setTaxonPourRechercheEflore(String taxonPourRechercheEflore) {
63
		this.taxonPourRechercheEflore = taxonPourRechercheEflore;
66
		this.taxonPourRechercheEflore = taxonPourRechercheEflore;
64
	}
67
	}
65
 
68
 
66
	public int getNumPageRechercheImage() {
69
	public int getNumPageRechercheImage() {
67
		return numPageRechercheImage;
70
		return numPageRechercheImage;
68
	}
71
	}
69
 
72
 
70
	// Pour la recherche :
73
	// Pour la recherche :
71
	public int getPasPagination() {
74
	public int getPasPagination() {
72
		return pasPagination;
75
		return pasPagination;
73
	}
76
	}
74
 
77
 
75
	public void setPasPagination(int pasPagination) {
78
	public void setPasPagination(int pasPagination) {
76
		this.pasPagination = pasPagination;
79
		this.pasPagination = pasPagination;
77
	}
80
	}
78
 
81
 
79
	public void setPageCouranteRechercheImages(int pageCouranteRecherche) {
82
	public void setPageCouranteRechercheImages(int pageCouranteRecherche) {
80
		this.pageCouranteRechercheImage = pageCouranteRecherche;
83
		this.pageCouranteRechercheImage = pageCouranteRecherche;
81
	}
84
	}
82
 
85
 
83
	public int getPageCouranteRechercheImage() {
86
	public int getPageCouranteRechercheImage() {
84
		return this.pageCouranteRechercheImage;
87
		return this.pageCouranteRechercheImage;
85
	}
88
	}
86
 
89
 
87
	public void setNbTotalImagesRecherchees(int nbTotalImagesRecherchees) {
90
	public void setNbTotalImagesRecherchees(int nbTotalImagesRecherchees) {
88
		this.nbTotalImagesRecherchees = nbTotalImagesRecherchees;
91
		this.nbTotalImagesRecherchees = nbTotalImagesRecherchees;
89
	}
92
	}
90
 
93
 
91
	public int getNbTotalImagesRecherchees() {
94
	public int getNbTotalImagesRecherchees() {
92
		return this.nbTotalImagesRecherchees;
95
		return this.nbTotalImagesRecherchees;
93
	}
96
	}
94
 
97
 
95
	public Image getImageCourante() {
98
	public Image getImageCourante() {
96
		return imageCourante;
99
		return imageCourante;
97
	}
100
	}
98
 
101
 
99
	public void setImageCourante(Image imageCourante) {
102
	public void setImageCourante(Image imageCourante) {
100
		this.imageCourante = imageCourante;
103
		this.imageCourante = imageCourante;
101
	}
104
	}
-
 
105
	
-
 
106
	public void setListeProtocoles(List<Protocole> listeProtocole) {
-
 
107
		this.listeProtocoles = listeProtocole;
-
 
108
	}
-
 
109
	
-
 
110
	public List<Protocole> getListeProtocoles() {
-
 
111
		return this.listeProtocoles;
-
 
112
	}
102
 
113
 
103
	public Protocole getProtocoleCourant() {
114
	public Protocole getProtocoleCourant() {
104
		return protocoleCourant;
115
		return protocoleCourant;
105
	}
116
	}
106
 
117
 
107
	public void setProtocoleCourant(Protocole protocoleCourant) {
118
	public void setProtocoleCourant(Protocole protocoleCourant) {
108
		this.protocoleCourant = protocoleCourant;
119
		this.protocoleCourant = protocoleCourant;
109
	}
120
	}
110
 
121
 
111
	public InformationsRecherche getInformationsRechercheImage() {
122
	public InformationsRecherche getInformationsRechercheImage() {
112
		if(informationsRechercheImage == null) {
123
		if(informationsRechercheImage == null) {
113
			informationsRechercheImage = new InformationsRecherche();
124
			informationsRechercheImage = new InformationsRecherche();
114
		}
125
		}
115
		return informationsRechercheImage;
126
		return informationsRechercheImage;
116
	}
127
	}
117
 
128
 
118
	public InformationsRecherche getInformationsRechercheObservation() {
129
	public InformationsRecherche getInformationsRechercheObservation() {
119
		if(informationsRechercheObservation == null) {
130
		if(informationsRechercheObservation == null) {
120
			informationsRechercheObservation = new InformationsRecherche();
131
			informationsRechercheObservation = new InformationsRecherche();
121
		}
132
		}
122
		return informationsRechercheObservation;
133
		return informationsRechercheObservation;
123
	}
134
	}
124
 
135
 
125
	public void setInformationsRechercheImage(InformationsRecherche informationsRechercheImage) {
136
	public void setInformationsRechercheImage(InformationsRecherche informationsRechercheImage) {
126
		this.informationsRechercheImage = informationsRechercheImage;
137
		this.informationsRechercheImage = informationsRechercheImage;
127
	}
138
	}
128
 
139
 
129
	public void setInformationsRechercheObservation(InformationsRecherche informationsRechercheObservation) {
140
	public void setInformationsRechercheObservation(InformationsRecherche informationsRechercheObservation) {
130
		this.informationsRechercheObservation = informationsRechercheObservation;
141
		this.informationsRechercheObservation = informationsRechercheObservation;
131
	}
142
	}
132
 
143
 
133
	public int getPageCouranteRechercheObservations() {
144
	public int getPageCouranteRechercheObservations() {
134
		return pageCouranteRechercheObservations;
145
		return pageCouranteRechercheObservations;
135
	}
146
	}
136
 
147
 
137
	public void setPageCouranteRechercheObservations(int pageCouranteRechercheObservations) {
148
	public void setPageCouranteRechercheObservations(int pageCouranteRechercheObservations) {
138
		this.pageCouranteRechercheObservations = pageCouranteRechercheObservations;
149
		this.pageCouranteRechercheObservations = pageCouranteRechercheObservations;
139
	}
150
	}
140
 
151
 
141
}
152
}