comparison flys-client/src/main/java/de/intevation/flys/client/server/StepForwardServiceImpl.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 d0a9acddbea2
comparison
equal deleted inserted replaced
1424:8974e220b193 1425:bc06a671ef60
51 51
52 /** 52 /**
53 * This method wraps the artifact operations FEED and ADVANCE. FEED is 53 * This method wraps the artifact operations FEED and ADVANCE. FEED is
54 * always triggerd, ADVANCE only, if there is at least one reachable state. 54 * always triggerd, ADVANCE only, if there is at least one reachable state.
55 * 55 *
56 * @param url The url of the artifact server.
57 * @param locale The locale used for the request. 56 * @param locale The locale used for the request.
58 * @param artifact The artifact that needs to be fed. 57 * @param artifact The artifact that needs to be fed.
59 * @param data An array of Data objects that contain the information that 58 * @param data An array of Data objects that contain the information that
60 * 59 *
61 * @return the modified artifact. 60 * @return the modified artifact.
62 */ 61 */
63 public Artifact go(String url, String locale, Artifact artifact, Data[] data) 62 public Artifact go(String locale, Artifact artifact, Data[] data)
64 throws ServerException 63 throws ServerException
65 { 64 {
66 logger.info("StepForwardServiceImpl.go"); 65 logger.info("StepForwardServiceImpl.go");
66
67 String url = getServletContext().getInitParameter("server-url");
67 68
68 Artifact afterFeed = feed(url, locale, artifact, data); 69 Artifact afterFeed = feed(url, locale, artifact, data);
69 70
70 if (afterFeed == null) { 71 if (afterFeed == null) {
71 logger.warn("StepForwardService.feed() - FAILED"); 72 logger.warn("StepForwardService.feed() - FAILED");
80 return afterFeed; 81 return afterFeed;
81 } 82 }
82 83
83 // We use the first reachable state as default target, maybe we need to 84 // We use the first reachable state as default target, maybe we need to
84 // change this later. 85 // change this later.
85 return advance(url, locale, afterFeed, reachable[0]); 86 return advance(locale, afterFeed, reachable[0]);
86 } 87 }
87 88
88 89
89 /** 90 /**
90 * This method triggers the FEED operation. 91 * This method triggers the FEED operation.

http://dive4elements.wald.intevation.org