package be.iminds.jfed.gts_highlevel.controller;

import be.iminds.ilabt.jfed.log.Logger;
import be.iminds.jfed.gts_highlevel.GtsServiceFactory;
import be.iminds.jfed.gts_highlevel.model.GtsCredentials;

import javax.inject.Inject;
import javax.inject.Singleton;

/**
 * User: twalcari
 * Date: 10/8/2015
 * Time: 16:09
 */
@Singleton
public class GtsReservationManagerFactory {
    private final GtsServiceFactory gtsServiceFactory;
    private final GtsConnectionProvider gtsConnectionProvider;
    private final GtsModel gtsModel;

    @Inject
    GtsReservationManagerFactory(GtsServiceFactory gtsServiceFactory,
                                        @GtsReservationManagerConnectionProvider GtsConnectionProvider gtsConnectionProvider,
                                        GtsModel gtsModel) {
        this.gtsServiceFactory = gtsServiceFactory;
        this.gtsConnectionProvider = gtsConnectionProvider;
        this.gtsModel = gtsModel;
    }

    public GtsReservationManager createGtsReservationManager(GtsCredentials gtsCredentials, Logger logger) {
        return new GtsReservationManager(gtsCredentials, logger, gtsServiceFactory, gtsConnectionProvider, gtsModel);
    }


}
