comparison flys-client/src/main/java/de/intevation/flys/client/server/CreateCollectionServiceImpl.java @ 229:924da6695800

Each service is now called with the name of the current locale to set the request object's locale manually in the HttpClient. flys-client/trunk@1681 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 14 Apr 2011 07:53:01 +0000
parents e02f50a3ad59
children 53ad6dd2cb2b
comparison
equal deleted inserted replaced
228:bbe32496dc84 229:924da6695800
37 * a new collection.*/ 37 * a new collection.*/
38 public static final String ERROR_CREATE_COLLECTION = 38 public static final String ERROR_CREATE_COLLECTION =
39 "error_create_collection"; 39 "error_create_collection";
40 40
41 41
42 public Collection create(String serverUrl, String ownerId) 42 public Collection create(String serverUrl, String locale, String ownerId)
43 throws ServerException 43 throws ServerException
44 { 44 {
45 System.out.println("Start creating a new collection."); 45 System.out.println("Start creating a new collection.");
46 46
47 Document create = 47 Document create =
48 ClientProtocolUtils.newCreateCollectionDocument(null); 48 ClientProtocolUtils.newCreateCollectionDocument(null);
49 HttpClient client = new HttpClientImpl(serverUrl); 49 HttpClient client = new HttpClientImpl(serverUrl, locale);
50 50
51 try { 51 try {
52 Document doc = (Document) client.createCollection( 52 Document doc = (Document) client.createCollection(
53 create, ownerId, new DocumentResponseHandler()); 53 create, ownerId, new DocumentResponseHandler());
54 54

http://dive4elements.wald.intevation.org