comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:3e62083dbcbf
1 package de.mpiwg.gazetteer.utils.exceptions;
2
3 import de.mpiwg.gazetteer.bo.LGFile;
4
5 public class VersioningException extends GazetteerException{
6
7 private static final long serialVersionUID = 3686916552150745726L;
8
9 private static int CODE = 1;
10
11 public LGFile userFile;
12 public LGFile currentFile;
13
14 public VersioningException(LGFile userFile, LGFile currentFile){
15 this.userFile = userFile;
16 this.currentFile = currentFile;
17 }
18
19 public String getMessage(){
20 String msg = "VersioningException: In the between time, somebody else saved a new version of this file. ";
21 msg += " You modified the version " + this.userFile.getVersion() + ", however the current version is " + this.currentFile.getVersion() + ".";
22 return msg;
23 }
24
25
26 public LGFile getUserFile() {
27 return userFile;
28 }
29
30 public void setUserFile(LGFile userFile) {
31 this.userFile = userFile;
32 }
33
34 public LGFile getCurrentFile() {
35 return currentFile;
36 }
37
38 public void setCurrentFile(LGFile currentFile) {
39 this.currentFile = currentFile;
40 }
41
42 public int getCode(){
43 return CODE;
44 }
45 }