Subversion Repositories eFlore/Applications.cel

Rev

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

Rev Author Line No. Line
2 aperonnet 1
package org.tela_botanica.client.modeles;
2
 
157 aurelien 3
import com.google.gwt.core.client.GWT;
2 aperonnet 4
import com.google.gwt.i18n.client.Dictionary;
5
 
6
/**
5 aperonnet 7
 * Classe chargeant certains paramètres de configuration à partir d'un fichier
8
 * javascript (config.js)
9
 *
2 aperonnet 10
 * @author aurelien
5 aperonnet 11
 *
2 aperonnet 12
 */
13
public class Configuration {
5 aperonnet 14
 
2 aperonnet 15
	/**
16
	 * L'url de base du serveur jrest
17
	 */
100 jpm 18
	private static String serviceBaseUrl;
5 aperonnet 19
 
100 jpm 20
	private static String imageBaseUrl;
81 jpm 21
 
100 jpm 22
	private static String suiviBugUrl ;
23
 
24
	private static String aideBaseUrl ;
252 aurelien 25
 
431 aurelien 26
	private static String emailContact;
27
 
252 aurelien 28
	private static String referentielGeo ;
271 aurelien 29
 
30
	private static String cleGoogleMaps ;
5 aperonnet 31
 
318 aurelien 32
	private static String lienEfloreBaseUrl;
33
 
34
	private static String refTax;
35
 
36
	private static String refTaxVersion;
596 aurelien 37
 
38
	private static String licence ="";
641 aurelien 39
 
40
	private static String formatOriginal = "";
41
 
42
	private static String formatZoom = "";
43
 
44
	private static String formatGalerie = "";
45
 
46
	private static String formatListe = "";
318 aurelien 47
 
2 aperonnet 48
	/**
49
	 * Constructeur sans argument
50
	 */
5 aperonnet 51
	public Configuration() {
52
		// on utilise le dictionnaire d'internationalisation pour lire les
53
		// variables du fichier javascript
140 aurelien 54
 
322 aurelien 55
		//if(GWT.isScript()) {
157 aurelien 56
			serviceBaseUrl = Dictionary.getDictionary("configuration").get(
57
					"serviceBaseUrl");
252 aurelien 58
 
431 aurelien 59
			emailContact = Dictionary.getDictionary("configuration").get(
60
			"emailContact");
61
 
157 aurelien 62
			suiviBugUrl = Dictionary.getDictionary("configuration").get(
63
			"suiviBugUrl");
252 aurelien 64
 
157 aurelien 65
			imageBaseUrl = Dictionary.getDictionary("configuration").get(
66
			"imageBaseUrl");
252 aurelien 67
 
157 aurelien 68
			aideBaseUrl = Dictionary.getDictionary("configuration").get(
69
			"aideBaseUrl");
252 aurelien 70
 
71
			referentielGeo = Dictionary.getDictionary("configuration").get(
72
			"referentielGeo");
73
 
271 aurelien 74
			cleGoogleMaps = Dictionary.getDictionary("configuration").get(
318 aurelien 75
			"cleGoogleMaps");
271 aurelien 76
 
318 aurelien 77
			lienEfloreBaseUrl = Dictionary.getDictionary("configuration").get(
78
			"lienEfloreBaseUrl");
79
 
80
			refTax = Dictionary.getDictionary("configuration").get(
81
			"refTax");
82
 
83
			refTaxVersion = Dictionary.getDictionary("configuration").get(
84
			"refTaxVersion");
596 aurelien 85
 
641 aurelien 86
			formatOriginal = Dictionary.getDictionary("configuration").get(
87
			"formatOriginal");
88
 
89
			formatZoom = Dictionary.getDictionary("configuration").get(
90
			"formatZoom");
91
 
92
			formatGalerie = Dictionary.getDictionary("configuration").get(
93
			"formatGalerie");
94
 
95
			formatListe = Dictionary.getDictionary("configuration").get(
96
			"formatListe");
97
 
596 aurelien 98
			//licence = Dictionary.getDictionary("configuration").get("licence");
2 aperonnet 99
	}
5 aperonnet 100
 
2 aperonnet 101
	/**
102
	 * Accesseur pour l'url de base du serveur jrest
5 aperonnet 103
	 *
2 aperonnet 104
	 * @return une url de la forme http://emplacement_serveur/jrest
105
	 */
100 jpm 106
	public static String getServiceBaseUrl() {
5 aperonnet 107
		return serviceBaseUrl;
2 aperonnet 108
	}
81 jpm 109
 
110
	/**
111
	 * Accesseur pour l'url de base du suivi de bug
112
	 *
113
	 * @return une url pointant vers le suivi des bugs
114
	 */
100 jpm 115
	public static String getSuiviBugUrl() {
81 jpm 116
		return suiviBugUrl;
117
	}
100 jpm 118
 
119
	/**
120
	 * Accesseur pour l'url de base des images
121
	 *
122
	 * @return une url pointant vers la racine du dossier contenant les images
123
	 */
124
	public static String getImageBaseUrl() {
125
		return imageBaseUrl ;
126
	}
127
 
128
	/**
129
	 * Accesseur pour l'url de base de l'aide
130
	 *
131
	 * @return une url pointant vers la racine de l'aide
132
	 */
133
	public static String getAideBaseUrl() {
134
		return aideBaseUrl ;
135
	}
136
 
252 aurelien 137
	/**
431 aurelien 138
	 * Accesseur pour l'email de contact du carnet en ligne
139
	 *
140
	 * @return une chaine contenant l'email de contact
141
	 */
142
	public static String getEmailContact() {
143
		return emailContact;
144
	}
145
 
146
	/**
271 aurelien 147
	 * Accesseur pour le référentiel geo
252 aurelien 148
	 *
271 aurelien 149
	 * @return le référentiel geo
252 aurelien 150
	 */
151
	public static String getReferentielGeo() {
152
		return referentielGeo ;
153
	}
271 aurelien 154
 
155
	/**
156
	 * Accesseur pour la clé google maps
157
	 *
158
	 * @return la clé google maps
159
	 */
160
	public static String getCleGoogleMaps() {
161
		return cleGoogleMaps ;
162
	}
2 aperonnet 163
 
318 aurelien 164
	public static String getLienEfloreBaseUrl() {
165
		return lienEfloreBaseUrl;
166
 
167
	}
168
 
169
	public static String getRefTax() {
170
		return refTax;
171
 
172
	}
173
 
174
	public static String getRefTaxVersion() {
175
		return refTaxVersion;
176
 
177
	}
596 aurelien 178
 
179
	public static String getLicence() {
180
		return licence;
181
	}
641 aurelien 182
 
183
	public static String getFormatOriginal() {
184
 
185
		return formatOriginal;
186
	}
187
 
188
	public static String getFormatZoom() {
189
 
190
		return formatZoom;
191
	}
192
 
193
	public static String getFormatGalerie() {
194
 
195
		return formatGalerie;
196
	}
197
 
198
	public static String getFormatListe() {
199
 
200
		return formatListe;
201
	}
2 aperonnet 202
}