From: David ‘Bombe’ Roden Date: Sat, 17 Mar 2012 12:07:55 +0000 (+0100) Subject: Store the edition of the last insert of a file. X-Git-Tag: 0.10-rc1~33 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=da8554fda646ef3b3e3e0e1d46c1e03e262aafdc;p=jSite.git Store the edition of the last insert of a file. --- diff --git a/src/de/todesbaum/jsite/application/FileOption.java b/src/de/todesbaum/jsite/application/FileOption.java index 2e5830d..8f77521 100644 --- a/src/de/todesbaum/jsite/application/FileOption.java +++ b/src/de/todesbaum/jsite/application/FileOption.java @@ -46,6 +46,9 @@ public class FileOption { /** The hash of the last insert. */ private String lastInsertHash; + /** The edition of the last insert. */ + private int lastInsertEdition; + /** The current hash of the file. */ private String currentHash; @@ -178,6 +181,27 @@ public class FileOption { } /** + * Returns the last edition at which this file was inserted. + * + * @return The last insert edition of this file + */ + public int getLastInsertEdition() { + return lastInsertEdition; + } + + /** + * Sets the last insert edition of this file. + * + * @param lastInsertEdition + * The last insert edition of this file + * @return These file options + */ + public FileOption setLastInsertEdition(int lastInsertEdition) { + this.lastInsertEdition = lastInsertEdition; + return this; + } + + /** * Returns the current hash of the file. This value is ony a temporary value * that is copied to {@link #getLastInsertHash()} when a project has * finished inserting.