// Path: src/main/java/com/aemreunal/exception/scenario/BeaconDoesNotHaveScenarioException.java
// public class BeaconDoesNotHaveScenarioException extends NullPointerException {
//     public BeaconDoesNotHaveScenarioException(Long beaconId, Long scenarioId) {
//         super("The beacon with ID " + beaconId + " is not part of scenario with ID " + scenarioId + ". No modifications have been made.");
//     }
// }
// 
// Path: src/main/java/com/aemreunal/exception/scenario/BeaconHasScenarioException.java
// public class BeaconHasScenarioException extends IllegalStateException {
//     public BeaconHasScenarioException(Long beaconId, Long scenarioId) {
//         super("The beacon with ID " + beaconId + " is part of scenario with ID " + scenarioId + ". No modifications have been made.");
//     }
// }
// 
// Path: src/main/java/com/aemreunal/exception/scenario/ScenarioNotFoundException.java
// public class ScenarioNotFoundException extends NullPointerException {
//     public ScenarioNotFoundException(Long scenarioId) {
//         super("The requested Scenario with ID " + scenarioId + " can not be found!");
//     }
// }
// 
// Path: src/main/java/com/aemreunal/helper/json/JsonBuilderFactory.java
// public class JsonBuilderFactory {
//     public static JsonObjectBuilder object() {
//         return new JsonObjectBuilder();
//     }
// 
//     public static JsonArrayBuilder array() {
//         return new JsonArrayBuilder();
//     }
// }


import net.minidev.json.JSONObject;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import com.aemreunal.exception.scenario.BeaconDoesNotHaveScenarioException;
import com.aemreunal.exception.scenario.BeaconHasScenarioException;
import com.aemreunal.exception.scenario.ScenarioNotFoundException;
import com.aemreunal.helper.json.JsonBuilderFactory;
package com.aemreunal.controller.scenario;

/*
 * *********************** *
 * Copyright (c) 2015      *
 *                         *
 * This code belongs to:   *
 *                         *
 * @author Ahmet Emre Ünal *
 * S001974                 *
 *                         *
 * aemreunal@gmail.com     *
 * emre.unal@ozu.edu.tr    *
 *                         *
 * aemreunal.com           *
 * *********************** *
 */



@ControllerAdvice
public class ScenarioControllerAdvice {
// Path: src/main/java/com/aemreunal/exception/scenario/BeaconDoesNotHaveScenarioException.java
// public class BeaconDoesNotHaveScenarioException extends NullPointerException {
//     public BeaconDoesNotHaveScenarioException(Long beaconId, Long scenarioId) {
//         super("The beacon with ID " + beaconId + " is not part of scenario with ID " + scenarioId + ". No modifications have been made.");
//     }
// }
// 
// Path: src/main/java/com/aemreunal/exception/scenario/BeaconHasScenarioException.java
// public class BeaconHasScenarioException extends IllegalStateException {
//     public BeaconHasScenarioException(Long beaconId, Long scenarioId) {
//         super("The beacon with ID " + beaconId + " is part of scenario with ID " + scenarioId + ". No modifications have been made.");
//     }
// }
// 
// Path: src/main/java/com/aemreunal/exception/scenario/ScenarioNotFoundException.java
// public class ScenarioNotFoundException extends NullPointerException {
//     public ScenarioNotFoundException(Long scenarioId) {
//         super("The requested Scenario with ID " + scenarioId + " can not be found!");
//     }
// }
// 
// Path: src/main/java/com/aemreunal/helper/json/JsonBuilderFactory.java
// public class JsonBuilderFactory {
//     public static JsonObjectBuilder object() {
//         return new JsonObjectBuilder();
//     }
// 
//     public static JsonArrayBuilder array() {
//         return new JsonArrayBuilder();
//     }
// }


// Path: src/main/java/com/aemreunal/controller/scenario/ScenarioControllerAdvice.java
import net.minidev.json.JSONObject;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import com.aemreunal.exception.scenario.BeaconDoesNotHaveScenarioException;
import com.aemreunal.exception.scenario.BeaconHasScenarioException;
import com.aemreunal.exception.scenario.ScenarioNotFoundException;
import com.aemreunal.helper.json.JsonBuilderFactory;

package com.aemreunal.controller.scenario;

/*
 * *********************** *
 * Copyright (c) 2015      *
 *                         *
 * This code belongs to:   *
 *                         *
 * @author Ahmet Emre Ünal *
 * S001974                 *
 *                         *
 * aemreunal@gmail.com     *
 * emre.unal@ozu.edu.tr    *
 *                         *
 * aemreunal.com           *
 * *********************** *
 */



@ControllerAdvice
public class ScenarioControllerAdvice {
    @ExceptionHandler(ScenarioNotFoundException.class)