Mercurial > hg > LGServices
diff src/main/java/de/mpiwg/gazetteer/utils/exceptions/VersioningException.java @ 0:3e62083dbcbf
First commit. This project comes from LGServer. We removed the framework icefaces. Now, LGServices uses just JSP and jquery.
author | "jurzua <jurzua@mpiwg-berlin.mpg.de>" |
---|---|
date | Thu, 23 Apr 2015 15:46:01 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/mpiwg/gazetteer/utils/exceptions/VersioningException.java Thu Apr 23 15:46:01 2015 +0200 @@ -0,0 +1,45 @@ +package de.mpiwg.gazetteer.utils.exceptions; + +import de.mpiwg.gazetteer.bo.LGFile; + +public class VersioningException extends GazetteerException{ + + private static final long serialVersionUID = 3686916552150745726L; + + private static int CODE = 1; + + public LGFile userFile; + public LGFile currentFile; + + public VersioningException(LGFile userFile, LGFile currentFile){ + this.userFile = userFile; + this.currentFile = currentFile; + } + + public String getMessage(){ + String msg = "VersioningException: In the between time, somebody else saved a new version of this file. "; + msg += " You modified the version " + this.userFile.getVersion() + ", however the current version is " + this.currentFile.getVersion() + "."; + return msg; + } + + + public LGFile getUserFile() { + return userFile; + } + + public void setUserFile(LGFile userFile) { + this.userFile = userFile; + } + + public LGFile getCurrentFile() { + return currentFile; + } + + public void setCurrentFile(LGFile currentFile) { + this.currentFile = currentFile; + } + + public int getCode(){ + return CODE; + } +}