changeset 4696:03c66281c16b

Rename methods and mark them private
author Björn Ricks <bjoern.ricks@intevation.de>
date Mon, 17 Dec 2012 16:17:53 +0100
parents 139cf1f9a22c
children 52068f1231da 756aba0d2a7a
files flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java	Mon Dec 17 16:16:49 2012 +0100
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java	Mon Dec 17 16:17:53 2012 +0100
@@ -843,7 +843,7 @@
                 @Override
                 public void onSuccess(Artifact artifact) {
                     GWT.log("Created new artifact: " + artifact.getUuid());
-                    createCollection(artifact);
+                    createClonedCollection(artifact);
                 }
             }
         );
@@ -877,7 +877,11 @@
     }
 
 
-    protected void createCollection(final Artifact artifact) {
+    /**
+     * Creates a {@link Collection} with the passed {@link Artifact}
+     * @param artifact {@link Artifact} to add to the new {@link Collection}
+     */
+    private void createClonedCollection(final Artifact artifact) {
         Config config        = Config.getInstance();
         final String locale  = config.getLocale();
         final String ownerid = user.identifier();
@@ -895,14 +899,14 @@
                 @Override
                 public void onSuccess(Collection collection) {
                     GWT.log("Successfully created a new collection.");
-                    addArtifactToCollection(artifact, collection);
+                    addArtifactToClonedCollection(artifact, collection);
                 }
             }
         );
     }
 
 
-    protected void addArtifactToCollection(Artifact a, Collection c) {
+    private void addArtifactToClonedCollection(Artifact a, Collection c) {
         Config config       = Config.getInstance();
         final String locale = config.getLocale();
 
@@ -922,14 +926,13 @@
                         name = cloneCollection.identifier();
                     }
 
-                    newColl.setName(messages.copy_of() + ": " + name);
+                    String colname = messages.copy_of() + ": " + name;
 
                     updateCollectionName(newColl, colname);
                     if(cloneCollection.getTTL() == 0) {
                         newColl.setTTL(0);
                         updateCollectionTTL(newColl);
                     }
-                    updateUserCollections();
                 }
             }
         );

http://dive4elements.wald.intevation.org