Skip to content
Snippets Groups Projects
Commit c51bd847 authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-4094 beans: Turn records to classes

parent 4089276d
No related branches found
No related tags found
2 merge requests!9Draft: Ozg 4094 wiremock ausprobieren,!7Ozg-4094 Konfiguration für nachrichten-manager
Pipeline #1479 passed
......@@ -9,14 +9,16 @@ import de.ozgcloud.nachrichten.postfach.PostfachNachricht;
import de.ozgcloud.nachrichten.postfach.PostfachRemoteService;
import de.ozgcloud.nachrichten.postfach.osiv2.config.Osi2PostfachProperties;
import de.ozgcloud.nachrichten.postfach.osiv2.transfer.PostfachApiFacadeService;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
@Service
@ConditionalOnProperty(prefix = Osi2PostfachProperties.PREFIX, name = "enabled", havingValue = "true")
@Log4j2
public record OsiPostfachRemoteService(
PostfachApiFacadeService postfachApiFacadeService
) implements PostfachRemoteService {
@RequiredArgsConstructor
public class OsiPostfachRemoteService implements PostfachRemoteService {
private final PostfachApiFacadeService postfachApiFacadeService;
public static final String POSTFACH_TYPE_OSI = "OSI";
@Override
......
......@@ -10,16 +10,19 @@ import de.ozgcloud.nachrichten.postfach.PostfachNachricht;
import de.ozgcloud.nachrichten.postfach.osiv2.config.Osi2PostfachProperties;
import de.ozgcloud.nachrichten.postfach.osiv2.gen.api.MessageExchangeApi;
import de.ozgcloud.nachrichten.postfach.osiv2.gen.model.MessageExchangeReceiveMessage;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
@Log4j2
@Service
@ConditionalOnProperty(prefix = Osi2PostfachProperties.PREFIX, name = "enabled", havingValue = "true")
public record PostfachApiFacadeService(
MessageExchangeApi messageExchangeApi,
RequestMapper requestMapper,
ResponseMapper responseMapper
) {
@RequiredArgsConstructor
public class PostfachApiFacadeService {
private final MessageExchangeApi messageExchangeApi;
private final RequestMapper requestMapper;
private final ResponseMapper responseMapper;
private static int MAX_NUMBER_RECEIVED_MESSAGES = 100;
public void sendMessage(PostfachNachricht nachricht) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment