Subversion Repositories eFlore/Applications.del

Rev

Rev 814 | Rev 1118 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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