projects
/
jSite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
1e1c1ee
)
Rename method to better describe the purpose.
author
David ‘Bombe’ Roden
<bombe@freenetproject.org>
Sat, 17 Mar 2012 18:09:10 +0000
(19:09 +0100)
committer
David ‘Bombe’ Roden
<bombe@freenetproject.org>
Sat, 17 Mar 2012 18:09:10 +0000
(19:09 +0100)
src/de/todesbaum/jsite/application/FileOption.java
patch
|
blob
|
history
src/de/todesbaum/jsite/application/Project.java
patch
|
blob
|
history
src/de/todesbaum/jsite/application/ProjectInserter.java
patch
|
blob
|
history
diff --git
a/src/de/todesbaum/jsite/application/FileOption.java
b/src/de/todesbaum/jsite/application/FileOption.java
index
8f77521
..
cb50c5c
100644
(file)
--- a/
src/de/todesbaum/jsite/application/FileOption.java
+++ b/
src/de/todesbaum/jsite/application/FileOption.java
@@
-206,7
+206,7
@@
public class FileOption {
* that is copied to {@link #getLastInsertHash()} when a project has
* finished inserting.
*
* that is copied to {@link #getLastInsertHash()} when a project has
* finished inserting.
*
- * @see Project#
copyHashes
()
+ * @see Project#
onSuccessfulInsert
()
* @return The current hash of the file
*/
public String getCurrentHash() {
* @return The current hash of the file
*/
public String getCurrentHash() {
diff --git
a/src/de/todesbaum/jsite/application/Project.java
b/src/de/todesbaum/jsite/application/Project.java
index
c7bdd79
..
bb722e7
100644
(file)
--- a/
src/de/todesbaum/jsite/application/Project.java
+++ b/
src/de/todesbaum/jsite/application/Project.java
@@
-420,11
+420,12
@@
public class Project implements Comparable<Project> {
}
/**
}
/**
- * Copies the current hashes of all file options to the last insert hashes,
- * updating the hashes for the next insert. This method should only be
- * called after the insert has finished successfully.
+ * Performs some post-processing on the project after it was inserted
+ * successfully. At the moment it copies the current hashes of all file
+ * options to the last insert hashes, updating the hashes for the next
+ * insert.
*/
*/
- public void
copyHashes
() {
+ public void
onSuccessfulInsert
() {
for (FileOption fileOption : fileOptions.values()) {
if ((fileOption.getCurrentHash() != null) && (fileOption.getCurrentHash().length() > 0) && !fileOption.getCurrentHash().equals(fileOption.getLastInsertHash())) {
fileOption.setLastInsertEdition(edition);
for (FileOption fileOption : fileOptions.values()) {
if ((fileOption.getCurrentHash() != null) && (fileOption.getCurrentHash().length() > 0) && !fileOption.getCurrentHash().equals(fileOption.getLastInsertHash())) {
fileOption.setLastInsertEdition(edition);
diff --git
a/src/de/todesbaum/jsite/application/ProjectInserter.java
b/src/de/todesbaum/jsite/application/ProjectInserter.java
index
c8cc0a2
..
404fc10
100644
(file)
--- a/
src/de/todesbaum/jsite/application/ProjectInserter.java
+++ b/
src/de/todesbaum/jsite/application/ProjectInserter.java
@@
-464,7
+464,7
@@
public class ProjectInserter implements FileScannerListener, Runnable {
int newEdition = Integer.parseInt(editionPart);
project.setEdition(newEdition);
project.setLastInsertionTime(System.currentTimeMillis());
int newEdition = Integer.parseInt(editionPart);
project.setEdition(newEdition);
project.setLastInsertionTime(System.currentTimeMillis());
- project.
copyHashes
();
+ project.
onSuccessfulInsert
();
}
fireProjectInsertFinished(success, cancelled ? new AbortedException() : (disconnected ? new IOException("Connection terminated") : null));
}
}
fireProjectInsertFinished(success, cancelled ? new AbortedException() : (disconnected ? new IOException("Connection terminated") : null));
}