All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.foodtechlab.lib.auth.service.domain.preference.config.ServicePreferenceConfig Maven / Gradle / Ivy

There is a newer version: 4.1.0
Show newest version
package ru.foodtechlab.lib.auth.service.domain.preference.config;

import lombok.Getter;
import lombok.experimental.Accessors;
import ru.foodtechlab.lib.auth.service.domain.role.port.RoleRepository;
import ru.foodtechlab.lib.auth.service.domain.preference.port.ServicePreferenceIdGenerator;
import ru.foodtechlab.lib.auth.service.domain.preference.port.ServicePreferenceRepository;
import ru.foodtechlab.lib.auth.service.domain.preference.usecase.CreateServicePreferenceUseCase;
import ru.foodtechlab.lib.auth.service.domain.preference.usecase.GetServicePreferenceUseCase;
import ru.foodtechlab.lib.auth.service.domain.preference.usecase.GetTTLForAuthWithConfirmationUseCase;
import ru.foodtechlab.lib.auth.service.domain.preference.usecase.UpdateServicePreferenceUseCase;

@Accessors(fluent = true)
@Getter
public class ServicePreferenceConfig {

    private final CreateServicePreferenceUseCase createSettings;
    private final GetServicePreferenceUseCase getSettings;
    private final GetTTLForAuthWithConfirmationUseCase getTTLForAuthWithConfirmation;
    private final UpdateServicePreferenceUseCase updateSettings;

    public ServicePreferenceConfig(ServicePreferenceRepository servicePreferenceRepository, ServicePreferenceIdGenerator servicePreferenceIdGenerator, RoleRepository roleRepository) {
        this.createSettings = new CreateServicePreferenceUseCase(servicePreferenceRepository, servicePreferenceIdGenerator);
        this.getSettings = new GetServicePreferenceUseCase(servicePreferenceRepository, createSettings);
        this.getTTLForAuthWithConfirmation = new GetTTLForAuthWithConfirmationUseCase(getSettings);
        this.updateSettings = new UpdateServicePreferenceUseCase(servicePreferenceRepository, getSettings);

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy