Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1967 Rev 2033
Line 61... Line 61...
61
	
61
	
Line 62... Line 62...
62
	private static String tailleMaxUpload;
62
	private static String tailleMaxUpload;
Line 63... Line -...
63
	
-
 
64
	private static List<InfosReferentielNom> referentielsDispos; 
-
 
65
	
63
	
Line 66... Line 64...
66
	private static Map<String,HashMap<String, String>> groupesChampsEtendus; 
64
	private static List<InfosReferentielNom> referentielsDispos; 
67
	
65
	
68
	private static String activerSaisieChampsEtendus = "0";
66
	private static String activerSaisieChampsEtendus = "0";
Line 133... Line 131...
133
					activerSaisieChampsEtendus = "1";
131
					activerSaisieChampsEtendus = "1";
134
				} else if(Location.getParameter("activerSaisieChampsEtendus").equals("0")) {
132
				} else if(Location.getParameter("activerSaisieChampsEtendus").equals("0")) {
135
					activerSaisieChampsEtendus = "0";
133
					activerSaisieChampsEtendus = "0";
136
				} 
134
				} 
137
			}
135
			}
138
			
-
 
139
			groupesChampsEtendus =  new HashMap<String,HashMap<String, String>>(); 
-
 
140
			if(activerSaisieChampsEtendus.equals("1")) {
-
 
141
				if(Dictionary.getDictionary("configuration").get("groupesChampsEtendus") != null &&
-
 
142
						!Dictionary.getDictionary("configuration").get("groupesChampsEtendus").isEmpty()) {
-
 
143
					groupesChampsEtendus = parserGroupesChampsEtendus(Dictionary.getDictionary("configuration").get(
-
 
144
							"groupesChampsEtendus"));
-
 
145
				}
-
 
146
			}
-
 
147
	}
-
 
148
	
-
 
149
	private HashMap<String,HashMap<String, String>> parserGroupesChampsEtendus(String groupeChampsEtendusJson) {
-
 
150
		HashMap<String,HashMap<String, String>> groupesChampsEtendus = new HashMap<String,HashMap<String, String>>();
-
 
151
		try {
-
 
152
			JSONValue groupesJson = JSONParser.parse(groupeChampsEtendusJson);
-
 
153
			JSONObject groupes = groupesJson.isObject();
-
 
154
			
-
 
155
			for (Iterator<String> iterator = groupes.keySet().iterator(); iterator.hasNext();) {
-
 
156
				String groupe = iterator.next();
-
 
157
				JSONValue listeClesLabelsJson = groupes.get(groupe);
-
 
158
				JSONObject listeClesLabels = listeClesLabelsJson.isObject();
-
 
159
				HashMap<String, String> groupesClesLabel = new HashMap<String, String>();
-
 
160
				for (Iterator<String> itCleLabels = listeClesLabels.keySet().iterator(); itCleLabels.hasNext();) {
-
 
161
					String cle = itCleLabels.next();
-
 
162
					String label = listeClesLabels.get(cle).isString().stringValue();	
-
 
163
					groupesClesLabel.put(cle, label);
-
 
164
				}
-
 
165
				groupesChampsEtendus.put(groupe, groupesClesLabel);
-
 
166
			}
-
 
167
		} catch (Exception e) {
-
 
168
			// TODO: handle exception
-
 
169
		}
-
 
170
		
-
 
171
		return groupesChampsEtendus;
-
 
172
	}
136
	}
Line 173... Line 137...
173
	
137
	
174
	private List<InfosReferentielNom> parserReferentielsDispos(String chaineListeReferentiels) {
138
	private List<InfosReferentielNom> parserReferentielsDispos(String chaineListeReferentiels) {
175
		String[] tabReferentiels = chaineListeReferentiels.split(";");
139
		String[] tabReferentiels = chaineListeReferentiels.split(";");
Line 285... Line 249...
285
	}
249
	}
Line 286... Line 250...
286
	
250
	
287
	public static boolean saisieChampsEtendusActivee() {
251
	public static boolean saisieChampsEtendusActivee() {
288
		return activerSaisieChampsEtendus.equals("1");
252
		return activerSaisieChampsEtendus.equals("1");
289
	}
-
 
290
	
-
 
291
	public static Map<String,HashMap<String, String>> getGroupesChampsEtendus() {
-
 
292
		return groupesChampsEtendus;
-
 
293
	}
253
	}