[Dive4elements-commits] [PATCH 2 of 7] Don't create Collection when a CollectionView for a new project is created

Wald Commits scm-commit at wald.intevation.org
Tue Dec 11 16:27:37 CET 2012


# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1355238680 -3600
# Node ID bea519b46919a11662bd5157787b23f885992b96
# Parent  65eadfe33466d98b60c79248137f788ec2606193
Don't create Collection when a CollectionView for a new project is created

This is the first step to not show collections which haven't got an artifact yet
in the project list.

diff -r 65eadfe33466 -r bea519b46919 flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Tue Dec 11 09:46:22 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Tue Dec 11 16:11:20 2012 +0100
@@ -134,10 +134,6 @@
      * <i>collection</i>.
      */
     public CollectionView(FLYS flys) {
-        // do this first because it takes longer than the other stuff in here.
-        User user = flys.getCurrentUser();
-        createNewCollection(user.identifier());
-
         this.flys          = flys;
         this.tabs          = new TabSet();
         this.outputTabs    = new HashMap<String, OutputTab>();
@@ -243,38 +239,6 @@
         tabs.addTab(parameterList);
     }
 
-
-    /**
-     * This method triggers the CreateCollectionService to create a new
-     * collection in the artifact server.
-     *
-     * @param ownerId The uuid of the user that should own the new collection.
-     */
-    protected void createNewCollection(String ownerId) {
-        GWT.log("CollectionView.createNewCollection");
-
-        Config config       = Config.getInstance();
-        final String locale = config.getLocale();
-
-        createCollectionService.create(
-            locale,
-            ownerId,
-            new AsyncCallback<Collection>() {
-                @Override
-                public void onFailure(Throwable caught) {
-                    GWT.log("Could not create the new collection.");
-                    SC.warn(FLYS.getExceptionString(messages, caught));
-                }
-
-                @Override
-                public void onSuccess(Collection collection) {
-                    GWT.log("Successfully created a new collection.");
-                    setCollection(collection);
-                }
-            });
-    }
-
-
     protected FLYS getFlys() {
         return flys;
     }


More information about the Dive4elements-commits mailing list