[Dive4elements-commits] [PATCH 8 of 8] Rename methods and mark them private
Wald Commits
scm-commit at wald.intevation.org
Mon Dec 17 16:19:20 CET 2012
# HG changeset patch
# User Björn Ricks <bjoern.ricks at intevation.de>
# Date 1355757473 -3600
# Node ID 03c66281c16b4fb87626da9f5bc03f868d5db1af
# Parent 139cf1f9a22cd480d2ea476538ca9b5179c4b952
Rename methods and mark them private
diff -r 139cf1f9a22c -r 03c66281c16b flys-client/src/main/java/de/intevation/flys/client/client/ui/ProjectList.java
--- 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();
}
}
);
More information about the Dive4elements-commits
mailing list