package cz.senslog.analytics.repository;

import cz.senslog.analytics.MockData;
import cz.senslog.analytics.domain.*;
import io.vertx.core.Future;

import java.util.List;
import java.util.Map;

public class MockConfigRepository implements ConfigurationRepository {

    @Override
    public Future<Map<Sensor, List<Group>>> loadSensorToGroupsMapping() {
        return Future.succeededFuture(MockData.mockSensorToGroupConfig());
    }

    @Override
    public Future<List<Threshold>> loadSensorThresholds() {
        return Future.succeededFuture(MockData.mockThresholdsConfigForSensors());
    }

    @Override
    public Future<List<MessageBrokerConfig>> loadMessageBrokers() {
        return Future.succeededFuture(MockData.mockMessageBrokers());
    }

    @Override
    public Future<List<SourceToMessageBroker>> loadSourceToMessageBrokerMapping() {
        return Future.succeededFuture(MockData.mockSourceToMessageBroker());
    }

    @Override
    public Future<Map<Long, Group>> loadGroupsByCollectorType(CollectorType type) {
        return Future.succeededFuture(MockData.mockGroupsConfig(type));
    }

    @Override
    public Future<List<Threshold>> loadGroupThresholds(CollectorType type) {
        return Future.succeededFuture(MockData.mockThresholdsConfigForGroups(type));
    }
}
