Mercurial > hg > LGServices
diff src/main/java/de/mpiwg/gazetteer/utils/exceptions/NoAuthorizedException.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/NoAuthorizedException.java Thu Apr 23 15:46:01 2015 +0200 @@ -0,0 +1,22 @@ +package de.mpiwg.gazetteer.utils.exceptions; + +public class NoAuthorizedException extends GazetteerException{ + private static final long serialVersionUID = 3483644794781830882L; + + private static int CODE = 2; + private Long userId; + private Long branchId; + + public NoAuthorizedException(Long userId, Long branchId){ + this.userId = userId; + this.branchId = branchId; + } + public String getMessage(){ + return "NoAuthorizedException: This user " + userId + " is not authorized to modify this branch (" + branchId + ")!"; + } + + public int getCode(){ + return CODE; + } + +}