comparison flys-client/src/main/java/de/intevation/flys/client/server/CollectionAttributeServiceImpl.java @ 1425:bc06a671ef60

Removed the URL parameter from service calls. The service implementations read the URL from the web.xml config file now. flys-client/trunk@3367 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 08 Dec 2011 09:12:27 +0000
parents ab8eb2f544f2
children
comparison
equal deleted inserted replaced
1424:8974e220b193 1425:bc06a671ef60
30 30
31 public static final String ERROR_UPDATING_COLLECTION_ATTRIBUTE = 31 public static final String ERROR_UPDATING_COLLECTION_ATTRIBUTE =
32 "error_update_collection_attribute"; 32 "error_update_collection_attribute";
33 33
34 34
35 public Collection update(Collection collection, String url, String locale) 35 public Collection update(Collection collection, String locale)
36 throws ServerException 36 throws ServerException
37 { 37 {
38 logger.info("CollectionAttributeServiceImpl.update"); 38 logger.info("CollectionAttributeServiceImpl.update");
39
40 String url = getServletContext().getInitParameter("server-url");
39 41
40 Document attribute = CollectionHelper.createAttribute(collection); 42 Document attribute = CollectionHelper.createAttribute(collection);
41 Document action = ClientProtocolUtils.newSetAttributeDocument( 43 Document action = ClientProtocolUtils.newSetAttributeDocument(
42 collection.identifier(), 44 collection.identifier(),
43 attribute); 45 attribute);
49 collection.identifier(), 51 collection.identifier(),
50 new DocumentResponseHandler()); 52 new DocumentResponseHandler());
51 53
52 logger.debug("Collection attribute successfully set."); 54 logger.debug("Collection attribute successfully set.");
53 55
54 return describe(collection.identifier(), url, locale); 56 return describe(collection.identifier(), locale);
55 } 57 }
56 catch (ConnectionException ce) { 58 catch (ConnectionException ce) {
57 logger.error(ce, ce); 59 logger.error(ce, ce);
58 } 60 }
59 61

http://dive4elements.wald.intevation.org