// Path: warehouse-model/src/main/java/warehouse/picklist/FifoRepository.java
// public interface FifoRepository {
//     Fifo get();
// 
//     void handle(String refNo, Object event);
// }
// 
// Path: warehouse-model/src/main/java/warehouse/quality/Destroyed.java
// @Value
// public class Destroyed {
//     private final PaletteLabel paletteLabel;
// }
// 
// Path: warehouse-model/src/main/java/warehouse/quality/Locked.java
// @Value
// public class Locked {
//     private final PaletteLabel paletteLabel;
// }
// 
// Path: warehouse-model/src/main/java/warehouse/quality/Unlocked.java
// @Value
// public class Unlocked {
//     private final PaletteLabel paletteLabel;
//     private final int recovered;
//     private final int scraped;
// }


import lombok.AllArgsConstructor;
import warehouse.picklist.FifoRepository;
import warehouse.products.*;
import warehouse.quality.Destroyed;
import warehouse.quality.Locked;
import warehouse.quality.Unlocked;
import java.util.concurrent.CompletableFuture;
package warehouse;



/**
 * Created by michal on 16.07.2016.
 */
public class EventMappings {

    private ProductStockAgentRepository stocks;
    private FifoRepository fifo;
    private OpsSupport support;

    public ExternalEvents externalEvents() {
        return new ExternalEvents();
    }

    public ProductStock.EventsContract productStocks() {
        return new ProductStocks();
    }

    @AllArgsConstructor
    public class ExternalEvents {

        public void emit(Locked event) {
            fifo.handle(event.getPaletteLabel().getRefNo(), event);
        }

// Path: warehouse-model/src/main/java/warehouse/picklist/FifoRepository.java
// public interface FifoRepository {
//     Fifo get();
// 
//     void handle(String refNo, Object event);
// }
// 
// Path: warehouse-model/src/main/java/warehouse/quality/Destroyed.java
// @Value
// public class Destroyed {
//     private final PaletteLabel paletteLabel;
// }
// 
// Path: warehouse-model/src/main/java/warehouse/quality/Locked.java
// @Value
// public class Locked {
//     private final PaletteLabel paletteLabel;
// }
// 
// Path: warehouse-model/src/main/java/warehouse/quality/Unlocked.java
// @Value
// public class Unlocked {
//     private final PaletteLabel paletteLabel;
//     private final int recovered;
//     private final int scraped;
// }


// Path: warehouse-infrastructure/src/main/java/warehouse/EventMappings.java
import lombok.AllArgsConstructor;
import warehouse.picklist.FifoRepository;
import warehouse.products.*;
import warehouse.quality.Destroyed;
import warehouse.quality.Locked;
import warehouse.quality.Unlocked;
import java.util.concurrent.CompletableFuture;

package warehouse;



/**
 * Created by michal on 16.07.2016.
 */
public class EventMappings {

    private ProductStockAgentRepository stocks;
    private FifoRepository fifo;
    private OpsSupport support;

    public ExternalEvents externalEvents() {
        return new ExternalEvents();
    }

    public ProductStock.EventsContract productStocks() {
        return new ProductStocks();
    }

    @AllArgsConstructor
    public class ExternalEvents {

        public void emit(Locked event) {
            fifo.handle(event.getPaletteLabel().getRefNo(), event);
        }

        public void emit(Unlocked event) {