diff flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java @ 3501:0de0ef04bcdc

Delete empty project after closing CollectionView (#785). flys-client/trunk@5234 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Christian Lins <christian.lins@intevation.de>
date Wed, 22 Aug 2012 12:29:33 +0000
parents 6b5920c7ea6e
children 6a8f83c538e3
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java	Mon Aug 20 08:25:58 2012 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java	Wed Aug 22 12:29:33 2012 +0000
@@ -1,28 +1,17 @@
 package de.intevation.flys.client.client;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
 import com.google.gwt.core.client.EntryPoint;
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.event.shared.UmbrellaException;
 import com.google.gwt.user.client.rpc.AsyncCallback;
 import com.google.gwt.xml.client.XMLParser;
-
 import com.smartgwt.client.util.SC;
+import com.smartgwt.client.widgets.HTMLPane;
 import com.smartgwt.client.widgets.Window;
-import com.smartgwt.client.widgets.HTMLPane;
-import com.smartgwt.client.widgets.layout.VLayout;
-import com.smartgwt.client.widgets.layout.HLayout;
+import com.smartgwt.client.widgets.events.CloseClickEvent;
 import com.smartgwt.client.widgets.events.CloseClickHandler;
-import com.smartgwt.client.widgets.events.CloseClickEvent;
-
-import de.intevation.flys.client.shared.model.Artifact;
-import de.intevation.flys.client.shared.model.Collection;
-import de.intevation.flys.client.shared.model.CollectionItem;
-import de.intevation.flys.client.shared.model.River;
-import de.intevation.flys.client.shared.model.User;
+import com.smartgwt.client.widgets.layout.HLayout;
+import com.smartgwt.client.widgets.layout.VLayout;
 
 import de.intevation.flys.client.client.event.CollectionChangeEvent;
 import de.intevation.flys.client.client.event.CollectionChangeHandler;
@@ -37,12 +26,21 @@
 import de.intevation.flys.client.client.services.UserService;
 import de.intevation.flys.client.client.services.UserServiceAsync;
 import de.intevation.flys.client.client.ui.CollectionView;
+import de.intevation.flys.client.client.ui.FLYSFooter;
 import de.intevation.flys.client.client.ui.FLYSHeader;
 import de.intevation.flys.client.client.ui.FLYSView;
 import de.intevation.flys.client.client.ui.FLYSWorkspace;
 import de.intevation.flys.client.client.ui.MainMenu;
 import de.intevation.flys.client.client.ui.ProjectList;
-import de.intevation.flys.client.client.ui.FLYSFooter;
+import de.intevation.flys.client.shared.model.Artifact;
+import de.intevation.flys.client.shared.model.Collection;
+import de.intevation.flys.client.shared.model.CollectionItem;
+import de.intevation.flys.client.shared.model.River;
+import de.intevation.flys.client.shared.model.User;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
 
 
 /**
@@ -102,6 +100,7 @@
     /**
      * This is the entry point method.
      */
+    @Override
     public void onModuleLoad() {
         openProjects = new ArrayList<String>();
 
@@ -141,11 +140,13 @@
         getRivers();
 
         userService.getCurrentUser(locale, new AsyncCallback<User>() {
+            @Override
             public void onFailure(Throwable caught) {
                 GWT.log("Could not find a logged in user.");
                 SC.warn(MSG.getString(caught.getMessage()));
             }
 
+            @Override
             public void onSuccess(User user) {
                 GWT.log("Found a user. Set '"+ user.getName() + "'");
                 setCurrentUser(user);
@@ -258,11 +259,13 @@
         String locale = config.getLocale();
 
         riverService.list(locale, new AsyncCallback<River[]>() {
+            @Override
             public void onFailure(Throwable caught) {
                 GWT.log("Could not recieve a list of rivers.");
                 SC.warn(MSG.getString(caught.getMessage()));
             }
 
+            @Override
             public void onSuccess(River[] newRivers) {
                 GWT.log("Retrieved " + newRivers.length + " new rivers.");
                 rivers = newRivers;
@@ -335,10 +338,12 @@
 
         describeCollectionService.describe(collectionID, locale,
             new AsyncCallback<Collection>() {
+                @Override
                 public void onFailure(Throwable caught) {
                     SC.warn(MSG.getString(caught.getMessage()));
                 }
 
+                @Override
                 public void onSuccess(Collection c) {
                     final Collection collection = c;
 
@@ -369,11 +374,13 @@
                         item.identifier(),
                         item.hash(),
                         new AsyncCallback<Artifact>() {
+                            @Override
                             public void onFailure(Throwable caught) {
                                 unlockProject(collectionID);
                                 SC.warn(MSG.getString(caught.getMessage()));
                             }
 
+                            @Override
                             public void onSuccess(Artifact artifact) {
                                 CollectionView view = new CollectionView(
                                     FLYS.this, collection, artifact);
@@ -408,11 +415,13 @@
 
         artifactService.create(locale, factory, null,
             new AsyncCallback<Artifact>() {
+                @Override
                 public void onFailure(Throwable caught) {
                     GWT.log("Could not create the new artifact.");
                     SC.warn(MSG.getString(caught.getMessage()));
                 }
 
+                @Override
                 public void onSuccess(Artifact artifact) {
                     GWT.log("Successfully created a new artifact.");
                 }
@@ -420,6 +429,7 @@
     }
 
 
+    @Override
     public void onCollectionChange(CollectionChangeEvent event) {
         Collection oldC = event.getOldValue();
 
@@ -444,6 +454,7 @@
             this.uuid = uuid;
         }
 
+        @Override
         public void onCloseClick(CloseClickEvent event) {
             flys.closeProject(uuid);
         }

http://dive4elements.wald.intevation.org