comparison gnv/src/main/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClientFactory.java @ 40:23a4f196d7d6

Adding Languagetransfer to the ArtifactDatabase to the GNV-Client gnv/trunk@180 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 02 Oct 2009 14:55:18 +0000
parents ad381cc47217
children 013d47662161
comparison
equal deleted inserted replaced
39:6c46f9b16166 40:23a4f196d7d6
2 * 2 *
3 */ 3 */
4 package de.intevation.gnv.artifactdatabase.client; 4 package de.intevation.gnv.artifactdatabase.client;
5 5
6 import org.apache.log4j.Logger; 6 import org.apache.log4j.Logger;
7
8 import java.util.Locale;
7 9
8 /** 10 /**
9 * @author Tim Englich <tim.englich@intevation.de> 11 * @author Tim Englich <tim.englich@intevation.de>
10 * 12 *
11 */ 13 */
32 /** 34 /**
33 * This Method provides an singleton Instance of this Class. 35 * This Method provides an singleton Instance of this Class.
34 * 36 *
35 * @return an singleton Instance of this Class 37 * @return an singleton Instance of this Class
36 */ 38 */
37 public static ArtifactDatabaseClientFactory getInstance() { 39 public static synchronized ArtifactDatabaseClientFactory getInstance() {
38 if (instance == null) { 40 if (instance == null) {
39 instance = new ArtifactDatabaseClientFactory(); 41 instance = new ArtifactDatabaseClientFactory();
40 } 42 }
41 return instance; 43 return instance;
42 } 44 }
43 45
44 /** 46 /**
45 * Getting the ArtifactDatabaseClient 47 * Getting the ArtifactDatabaseClient
46 * 48 * @param locale teh Local that should be used for the Communication
47 * @return the ArtifactDatabaseClient 49 * @return the ArtifactDatabaseClient
48 */ 50 */
49 public ArtifactDatabaseClient getArtifactDatabaseClient() { 51 public ArtifactDatabaseClient getArtifactDatabaseClient(Locale locale) {
50 // TODO Read from Configuration? 52 // TODO Read from Configuration?
51 return new DefaultArtifactDatabaseClient(); 53 DefaultArtifactDatabaseClient adc = new DefaultArtifactDatabaseClient();
54 adc.setLocale(locale);
55 return adc;
56
52 } 57 }
53 58
54 } 59 }

http://dive4elements.wald.intevation.org