view src/main/java/de/mpiwg/gazetteer/utils/exceptions/NoAuthorizedException.java @ 10:5610250d021a default tip

SectionsIndex, we added a method to print the setting of the VM
author "jurzua <jurzua@mpiwg-berlin.mpg.de>"
date Thu, 19 Mar 2015 11:46:33 +0100
parents 7682c04c63a8
children
line wrap: on
line source

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;
	}
	
}