// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/input/DestinationProvider.java
// public class DestinationProvider extends AbstractService {
// 
//     private static final Store.DestinationStore destinations = new Store.DestinationStore();
// 
//     public static void start() {
//         readFile("destinations", Store.DestinationStore.class).ifPresent(destinations::putAll);
//     }
// 
//     public static void stop() {
//        backup();
//     }
// 
//     public static void backup() {
//         writeFile("destinations", destinations);
//     }
// 
//     public static void updateDestinations(List<Destination> dests) {
//         dests.forEach(d -> destinations.putIfAbsent(d.getCode(), d));
//     }
// 
//     public static Destination get(String code) {
//         return destinations.get(code);
//     }
// 
//     public static Destination get(String dataowner, String destinationCode) {
//         return get(dataowner+":"+destinationCode);
//     }
// 
//     public static Map<String, Destination> getAll() {
//         return destinations;
//     }
// 
// 
// 
// }


import nl.crowndov.displaydirect.distribution.input.DestinationProvider;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
package nl.crowndov.displaydirect.distribution.resources;



/**
 * Copyright 2017 CROW-NDOV
 *
 * This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package.
 */
@Path("/v1/destination")
public class DestinationResource {

    @GET
    public Response get() {
// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/input/DestinationProvider.java
// public class DestinationProvider extends AbstractService {
// 
//     private static final Store.DestinationStore destinations = new Store.DestinationStore();
// 
//     public static void start() {
//         readFile("destinations", Store.DestinationStore.class).ifPresent(destinations::putAll);
//     }
// 
//     public static void stop() {
//        backup();
//     }
// 
//     public static void backup() {
//         writeFile("destinations", destinations);
//     }
// 
//     public static void updateDestinations(List<Destination> dests) {
//         dests.forEach(d -> destinations.putIfAbsent(d.getCode(), d));
//     }
// 
//     public static Destination get(String code) {
//         return destinations.get(code);
//     }
// 
//     public static Destination get(String dataowner, String destinationCode) {
//         return get(dataowner+":"+destinationCode);
//     }
// 
//     public static Map<String, Destination> getAll() {
//         return destinations;
//     }
// 
// 
// 
// }


// Path: distribution/src/main/java/nl/crowndov/displaydirect/distribution/resources/DestinationResource.java
import nl.crowndov.displaydirect.distribution.input.DestinationProvider;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;

package nl.crowndov.displaydirect.distribution.resources;



/**
 * Copyright 2017 CROW-NDOV
 *
 * This file is subject to the terms and conditions defined in file 'LICENSE.txt', which is part of this source code package.
 */
@Path("/v1/destination")
public class DestinationResource {

    @GET
    public Response get() {
        return Response.ok(DestinationProvider.getAll()).build();