* 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() {
}
/**
- * 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);
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));
}