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

ru.foodtechlab.lib.auth.service.domain.confirmationCodeSendingTask.usecases.TransferTaskToInProgressUseCase Maven / Gradle / Ivy

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

import com.rcore.domain.commons.usecase.UseCase;
import com.rcore.domain.commons.usecase.model.VoidOutputValues;
import lombok.RequiredArgsConstructor;
import lombok.Value;
import ru.foodtechlab.lib.auth.service.domain.confirmationCodeSendingTask.entity.ConfirmationCodeSendingTaskEntity;
import ru.foodtechlab.lib.auth.service.domain.confirmationCodeSendingTask.port.ConfirmationCodeSendingTaskRepository;

@RequiredArgsConstructor
public class TransferTaskToInProgressUseCase extends UseCase {

    private final ConfirmationCodeSendingTaskRepository repository;

    @Override
    public VoidOutputValues execute(InputValues inputValues) {
        inputValues.task.inProgress();
        repository.save(inputValues.getTask());
        return new VoidOutputValues();
    }

    @Value(staticConstructor = "of")
    public static class InputValues implements UseCase.InputValues {
        ConfirmationCodeSendingTaskEntity task;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy