comparison flys-client/src/main/java/de/intevation/flys/client/client/FLYS.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 94d4f040da3a
children 07b9404d7170
comparison
equal deleted inserted replaced
1424:8974e220b193 1425:bc06a671ef60
134 vertical.draw(); 134 vertical.draw();
135 135
136 initConfiguration(); 136 initConfiguration();
137 137
138 Config config = Config.getInstance(); 138 Config config = Config.getInstance();
139 String url = config.getServerUrl();
140 String locale = config.getLocale(); 139 String locale = config.getLocale();
141 140
142 getRivers(); 141 getRivers();
143 142
144 userService.getCurrentUser(url, locale, new AsyncCallback<User>() { 143 userService.getCurrentUser(locale, new AsyncCallback<User>() {
145 public void onFailure(Throwable caught) { 144 public void onFailure(Throwable caught) {
146 GWT.log("Could not find a logged in user."); 145 GWT.log("Could not find a logged in user.");
147 SC.warn(MSG.getString(caught.getMessage())); 146 SC.warn(MSG.getString(caught.getMessage()));
148 } 147 }
149 148
259 String url = config.getServerUrl(); 258 String url = config.getServerUrl();
260 String locale = config.getLocale(); 259 String locale = config.getLocale();
261 260
262 GWT.log("Fetch rivers from server '" + url + "'"); 261 GWT.log("Fetch rivers from server '" + url + "'");
263 262
264 riverService.list(url, locale, new AsyncCallback<River[]>() { 263 riverService.list(locale, new AsyncCallback<River[]>() {
265 public void onFailure(Throwable caught) { 264 public void onFailure(Throwable caught) {
266 GWT.log("Could not recieve a list of rivers."); 265 GWT.log("Could not recieve a list of rivers.");
267 SC.warn(MSG.getString(caught.getMessage())); 266 SC.warn(MSG.getString(caught.getMessage()));
268 } 267 }
269 268
333 lockProject(collectionID); 332 lockProject(collectionID);
334 333
335 GWT.log("Open existing project: " + collectionID); 334 GWT.log("Open existing project: " + collectionID);
336 335
337 Config config = Config.getInstance(); 336 Config config = Config.getInstance();
338 final String url = config.getServerUrl();
339 final String locale = config.getLocale(); 337 final String locale = config.getLocale();
340 338
341 describeCollectionService.describe(collectionID, url, locale, 339 describeCollectionService.describe(collectionID, locale,
342 new AsyncCallback<Collection>() { 340 new AsyncCallback<Collection>() {
343 public void onFailure(Throwable caught) { 341 public void onFailure(Throwable caught) {
344 SC.warn(MSG.getString(caught.getMessage())); 342 SC.warn(MSG.getString(caught.getMessage()));
345 } 343 }
346 344
368 SC.warn(MSG.error_load_parameterization()); 366 SC.warn(MSG.error_load_parameterization());
369 return; 367 return;
370 } 368 }
371 369
372 getArtifactService.getArtifact( 370 getArtifactService.getArtifact(
373 url,
374 locale, 371 locale,
375 item.identifier(), 372 item.identifier(),
376 item.hash(), 373 item.hash(),
377 new AsyncCallback<Artifact>() { 374 new AsyncCallback<Artifact>() {
378 public void onFailure(Throwable caught) { 375 public void onFailure(Throwable caught) {
411 public void newArtifact(String factory) { 408 public void newArtifact(String factory) {
412 Config config = Config.getInstance(); 409 Config config = Config.getInstance();
413 String url = config.getServerUrl(); 410 String url = config.getServerUrl();
414 String locale = config.getLocale(); 411 String locale = config.getLocale();
415 412
416 artifactService.create(url, locale, factory, null, 413 artifactService.create(locale, factory, null,
417 new AsyncCallback<Artifact>() { 414 new AsyncCallback<Artifact>() {
418 public void onFailure(Throwable caught) { 415 public void onFailure(Throwable caught) {
419 GWT.log("Could not create the new artifact."); 416 GWT.log("Could not create the new artifact.");
420 SC.warn(MSG.getString(caught.getMessage())); 417 SC.warn(MSG.getString(caught.getMessage()));
421 } 418 }

http://dive4elements.wald.intevation.org