Mercurial > dive4elements > river
diff gwt-client/src/main/java/org/dive4elements/river/client/client/FLYS.java @ 8303:519023ce3500
Updated the client to build a default artifact for gauge discharge curve.
* Removed code for special gauge discharge artifact
* Updated GaugeListGrid in info panel to create a the new project
* Updated i18n
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Mon, 22 Sep 2014 17:08:48 +0200 |
parents | d19a0ffb9ccf |
children | e3a63d9c5bb1 |
line wrap: on
line diff
--- a/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYS.java Mon Sep 22 17:05:37 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/client/FLYS.java Mon Sep 22 17:08:48 2014 +0200 @@ -496,62 +496,6 @@ } - /** Open window with gauges discharge curve. */ - public void newGaugeDischargeCurve(String river, Long gaugeref) { - Config config = Config.getInstance(); - - final String locale = config.getLocale(); - final String riv = river; - final Long ref = gaugeref; - final FLYS flys = this; - - User user = getCurrentUser(); - - if (user == null) { - SC.warn(MSG.error_not_logged_in()); - return; - } - - // TODO 1081, this collection needs to be added a mainvalue artifact - collectionService.create(locale, user.identifier(), - new AsyncCallback<Collection>() { - @Override - public void onFailure(Throwable caught) { - GWT.log("Could not create new collection."); - SC.warn(getExceptionString(MSG, caught)); - } - - @Override - public void onSuccess(Collection collection) { - GWT.log("Successfully created a new collection."); - final Collection col = collection; - artifactService.createGaugeDischargeCurveArtifact( - col, locale, riv, ref, - new AsyncCallback<Artifact>() { - @Override - public void onFailure(Throwable caught) { - GWT.log("Could not create the new artifact."); - SC.warn(getExceptionString(MSG, caught)); - } - - @Override - public void onSuccess(Artifact artifact) { - GWT.log("Successfully created a new artifact."); - CollectionView view = new CollectionView(flys, - col, artifact); - workspace.addView(col.identifier(), view); - - view.addCollectionChangeHandler(getProjectList()); - view.addCloseClickHandler( - new CloseCollectionViewHandler( - FLYS.this, col.identifier())); - projectList.updateUserCollections(); - } - }); - } - }); - } - public void newSQRelation(String river, int measurementStation) { Config config = Config.getInstance();