Subversion Repositories eFlore/Applications.coel

Rev

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

Rev 69 Rev 88
Line 1... Line 1...
1
package org.tela_botanica.client.modeles;
1
package org.tela_botanica.client.modeles;
Line -... Line 2...
-
 
2
 
-
 
3
import java.util.LinkedHashMap;
2
 
4
 
Line 3... Line 5...
3
import com.google.gwt.i18n.client.Dictionary;
5
import com.google.gwt.i18n.client.Dictionary;
4
 
6
 
5
/**
7
/**
Line 18... Line 20...
18
	
20
	
19
	/**
21
	/**
20
	 * L'url de base du Carnet en Ligne
22
	 * L'url de base du Carnet en Ligne
21
	 */
23
	 */
-
 
24
	private String celUrl;
-
 
25
	
-
 
26
	/**
-
 
27
	 * Tableau associatif contenant les identifiants des listes 
-
 
28
	 */
Line 22... Line 29...
22
	private String celUrl;
29
	private LinkedHashMap<String, Integer> listesId = new LinkedHashMap<String, Integer>();
23
 
30
 
24
	/**
31
	/**
25
	 * Constructeur sans argument
32
	 * Constructeur sans argument
26
	 */
33
	 */
27
	public Configuration() {
34
	public Configuration() {
28
		// on utilise le dictionnaire d'internationalisation pour lire les variables du fichier javascript
35
		// on utilise le dictionnaire d'internationalisation pour lire les variables du fichier javascript
29
		Dictionary configuration = Dictionary.getDictionary("configuration");
36
		Dictionary configuration = Dictionary.getDictionary("configuration");
-
 
37
		serviceBaseUrl = configuration.get("serviceBaseUrl");
-
 
38
		celUrl = configuration.get("celUrl");
30
		serviceBaseUrl = configuration.get("serviceBaseUrl");
39
		listesId.put("stpr", Integer.valueOf(configuration.get("listeStpr")));
Line 31... Line 40...
31
		celUrl = configuration.get("celUrl");
40
		listesId.put("stpu", Integer.valueOf(configuration.get("listeStpu")));
32
	}
41
	}
33
 
42
 
Line 46... Line 55...
46
	 * @return une url de la forme http://emplacement_serveur/
55
	 * @return une url de la forme http://emplacement_serveur/
47
	 */
56
	 */
48
	public String getCelUrl() {
57
	public String getCelUrl() {
49
		return celUrl;
58
		return celUrl;
50
	}
59
	}
-
 
60
	
-
 
61
	/**
-
 
62
	 * Accesseur pour l'id d'une liste
-
 
63
	 * 
-
 
64
	 * @return l'identifiant de la liste ou null s'il n'est pas trouvé
-
 
65
	 */
-
 
66
	public Integer getListeId(String code) {
-
 
67
		if (listesId.containsKey(code)) {
-
 
68
			return listesId.get(code);
-
 
69
		}
-
 
70
		return null;
-
 
71
	}
Line 51... Line 72...
51
 
72
 
52
}
73
}