Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • OZG-4093-Anbindung-OSI-Postfach-Version-2
  • OZG-4094-Nachrichten-Senden
  • OZG-4094-OSI2-Postfach-Facade
  • OZG-5636-BayernID-Umlaute-Problem
  • fix-antragraum-issue
  • main
  • release
  • 2.10.0
  • 2.11.0
  • 2.12.0
  • 2.12.1
  • 2.13.0
  • 2.14.0
  • 2.14.1
  • 2.15.0
  • 2.16.0
  • 2.17.0
  • 2.18.0
  • 2.19.0
  • 2.20.0
  • 2.21.0
  • 2.7.0
  • 2.8.0
  • 2.8.1
  • 2.9.0
25 results

Target

Select target project
  • ozg-cloud/app/nachrichten-manager
1 result
Select Git revision
  • OZG-4093-Anbindung-OSI-Postfach-Version-2
  • OZG-4094-Nachrichten-Senden
  • OZG-4094-OSI2-Postfach-Facade
  • OZG-5636-BayernID-Umlaute-Problem
  • fix-antragraum-issue
  • main
  • release
  • 2.10.0
  • 2.11.0
  • 2.12.0
  • 2.12.1
  • 2.13.0
  • 2.14.0
  • 2.14.1
  • 2.15.0
  • 2.16.0
  • 2.17.0
  • 2.18.0
  • 2.19.0
  • 2.20.0
  • 2.21.0
  • 2.7.0
  • 2.8.0
  • 2.8.1
  • 2.9.0
25 results
Show changes
Commits on Source (9)
Showing
with 24 additions and 53 deletions
...@@ -24,20 +24,21 @@ ...@@ -24,20 +24,21 @@
unter der Lizenz sind dem Lizenztext zu entnehmen. unter der Lizenz sind dem Lizenztext zu entnehmen.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>de.ozgcloud.common</groupId> <groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-dependencies</artifactId> <artifactId>ozgcloud-common-dependencies</artifactId>
<version>4.7.0</version> <version>4.11.0</version>
<relativePath /> <relativePath />
</parent> </parent>
<groupId>de.ozgcloud.nachrichten</groupId> <groupId>de.ozgcloud.nachrichten</groupId>
<artifactId>nachrichten-manager-interface</artifactId> <artifactId>nachrichten-manager-interface</artifactId>
<version>2.17.0</version> <version>2.18.0</version>
<name>OZG-Cloud Nachrichten Manager gRPC Interface</name> <name>OZG-Cloud Nachrichten Manager gRPC Interface</name>
<description>Interface (gRPC) for Nachrichten Manager</description> <description>Interface (gRPC) for Nachrichten Manager</description>
...@@ -110,7 +111,9 @@ ...@@ -110,7 +111,9 @@
</outputTarget> </outputTarget>
<outputTarget> <outputTarget>
<type>grpc-java</type> <type>grpc-java</type>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${protoc-gen.version}</pluginArtifact> <pluginArtifact>
io.grpc:protoc-gen-grpc-java:${protoc-gen.version}
</pluginArtifact>
</outputTarget> </outputTarget>
</outputTargets> </outputTargets>
</configuration> </configuration>
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<parent> <parent>
<groupId>de.ozgcloud.nachrichten</groupId> <groupId>de.ozgcloud.nachrichten</groupId>
<artifactId>nachrichten-manager</artifactId> <artifactId>nachrichten-manager</artifactId>
<version>2.17.0</version> <version>2.18.0</version>
<relativePath>../</relativePath> <relativePath>../</relativePath>
</parent> </parent>
......
...@@ -25,7 +25,5 @@ package de.ozgcloud.nachrichten.postfach; ...@@ -25,7 +25,5 @@ package de.ozgcloud.nachrichten.postfach;
public interface PostfachAddressIdentifier { public interface PostfachAddressIdentifier {
default boolean isStringBasedIdentifier() { String getStringRepresentation();
return false;
}
} }
...@@ -26,22 +26,20 @@ package de.ozgcloud.nachrichten.postfach; ...@@ -26,22 +26,20 @@ package de.ozgcloud.nachrichten.postfach;
import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotBlank;
import lombok.Builder; import lombok.Builder;
import lombok.Getter;
@Builder @Builder
@Getter
public class StringBasedIdentifier implements PostfachAddressIdentifier { public class StringBasedIdentifier implements PostfachAddressIdentifier {
@NotBlank @NotBlank
private String postfachId; private String postfachId;
@Override @Override
public boolean isStringBasedIdentifier() { public String toString() {
return true; return postfachId;
} }
@Override @Override
public String toString() { public String getStringRepresentation() {
return postfachId; return postfachId;
} }
} }
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<parent> <parent>
<groupId>de.ozgcloud.nachrichten</groupId> <groupId>de.ozgcloud.nachrichten</groupId>
<artifactId>nachrichten-manager</artifactId> <artifactId>nachrichten-manager</artifactId>
<version>2.17.0</version> <version>2.18.0</version>
<relativePath>../</relativePath> <relativePath>../</relativePath>
</parent> </parent>
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
<vorgang-manager.version>2.17.0</vorgang-manager.version> <vorgang-manager.version>2.17.0</vorgang-manager.version>
<muk-postfach.version>0.1.0</muk-postfach.version> <muk-postfach.version>0.1.0</muk-postfach.version>
<api-lib.version>0.16.0</api-lib.version> <api-lib.version>0.16.0</api-lib.version>
<ozgcloud-common.version>4.7.0</ozgcloud-common.version>
</properties> </properties>
<dependencies> <dependencies>
...@@ -101,12 +100,6 @@ ...@@ -101,12 +100,6 @@
<version>${api-lib.version}</version> <version>${api-lib.version}</version>
</dependency> </dependency>
<dependency>
<groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-lib</artifactId>
<version>${ozgcloud-common.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId> <artifactId>spring-boot-starter-mail</artifactId>
...@@ -241,10 +234,6 @@ ...@@ -241,10 +234,6 @@
<type>test-jar</type> <type>test-jar</type>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-lib</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -34,7 +34,6 @@ import de.ozgcloud.nachrichten.postfach.PostfachAddress; ...@@ -34,7 +34,6 @@ import de.ozgcloud.nachrichten.postfach.PostfachAddress;
import de.ozgcloud.nachrichten.postfach.PostfachException; import de.ozgcloud.nachrichten.postfach.PostfachException;
import de.ozgcloud.nachrichten.postfach.PostfachMessageCode; import de.ozgcloud.nachrichten.postfach.PostfachMessageCode;
import de.ozgcloud.nachrichten.postfach.PostfachNachricht; import de.ozgcloud.nachrichten.postfach.PostfachNachricht;
import de.ozgcloud.nachrichten.postfach.StringBasedIdentifier;
import lombok.NonNull; import lombok.NonNull;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
...@@ -71,12 +70,6 @@ public class InfoManagerService { ...@@ -71,12 +70,6 @@ public class InfoManagerService {
} }
String getPostfachId(@NonNull PostfachAddress address) { String getPostfachId(@NonNull PostfachAddress address) {
var postfachIdentifier = address.getIdentifier(); return address.getIdentifier().getStringRepresentation();
if (postfachIdentifier.isStringBasedIdentifier()) {
return ((StringBasedIdentifier) postfachIdentifier).getPostfachId();
} else {
throw new IllegalStateException("Illegal Type of Postfach Identifier: " + postfachIdentifier.getClass().getName());
}
} }
} }
...@@ -239,7 +239,6 @@ public abstract class PostfachNachrichtMapper { ...@@ -239,7 +239,6 @@ public abstract class PostfachNachrichtMapper {
} }
private Map<String, Object> buildPostfachAddressIdentifierMap(PostfachAddress postfachAddress) { private Map<String, Object> buildPostfachAddressIdentifierMap(PostfachAddress postfachAddress) {
var identifier = (StringBasedIdentifier) postfachAddress.getIdentifier(); return Map.of(PostfachAddress.FIELD_POSTFACH_ID, postfachAddress.getIdentifier().getStringRepresentation());
return Map.of(PostfachAddress.FIELD_POSTFACH_ID, identifier.getPostfachId());
} }
} }
\ No newline at end of file
...@@ -38,7 +38,6 @@ import org.mapstruct.ReportingPolicy; ...@@ -38,7 +38,6 @@ import org.mapstruct.ReportingPolicy;
import de.ozgcloud.common.errorhandling.TechnicalException; import de.ozgcloud.common.errorhandling.TechnicalException;
import de.ozgcloud.nachrichten.postfach.PostfachAddress; import de.ozgcloud.nachrichten.postfach.PostfachAddress;
import de.ozgcloud.nachrichten.postfach.PostfachNachricht; import de.ozgcloud.nachrichten.postfach.PostfachNachricht;
import de.ozgcloud.nachrichten.postfach.StringBasedIdentifier;
import de.ozgcloud.nachrichten.postfach.bayernid.proxy.GrpcAbsender; import de.ozgcloud.nachrichten.postfach.bayernid.proxy.GrpcAbsender;
import de.ozgcloud.nachrichten.postfach.bayernid.proxy.GrpcAttachmentMetadata; import de.ozgcloud.nachrichten.postfach.bayernid.proxy.GrpcAttachmentMetadata;
import de.ozgcloud.nachrichten.postfach.bayernid.proxy.GrpcBayernIdMessageMetadata; import de.ozgcloud.nachrichten.postfach.bayernid.proxy.GrpcBayernIdMessageMetadata;
...@@ -85,7 +84,7 @@ interface BayernIdPostfachNachrichtMapper { ...@@ -85,7 +84,7 @@ interface BayernIdPostfachNachrichtMapper {
BayernIdResponse fromSendBayernIdMessageResponse(GrpcSendBayernIdMessageResponse response); BayernIdResponse fromSendBayernIdMessageResponse(GrpcSendBayernIdMessageResponse response);
default String toPostkorbId(PostfachAddress postfachAddress) { default String toPostkorbId(PostfachAddress postfachAddress) {
return ((StringBasedIdentifier) postfachAddress.getIdentifier()).getPostfachId(); return (postfachAddress.getIdentifier()).getStringRepresentation();
} }
@Condition @Condition
......
...@@ -35,6 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -35,6 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import de.ozgcloud.nachrichten.postfach.FileId; import de.ozgcloud.nachrichten.postfach.FileId;
import de.ozgcloud.nachrichten.postfach.PostfachAddress; import de.ozgcloud.nachrichten.postfach.PostfachAddress;
import de.ozgcloud.nachrichten.postfach.PostfachAddressIdentifier;
import de.ozgcloud.nachrichten.postfach.PostfachNachricht; import de.ozgcloud.nachrichten.postfach.PostfachNachricht;
import de.ozgcloud.nachrichten.postfach.StringBasedIdentifier; import de.ozgcloud.nachrichten.postfach.StringBasedIdentifier;
...@@ -78,9 +79,7 @@ public abstract class OsiPostfachMessageMapper { ...@@ -78,9 +79,7 @@ public abstract class OsiPostfachMessageMapper {
String toPostfachId(PostfachNachricht nachricht) { String toPostfachId(PostfachNachricht nachricht) {
return Optional.ofNullable(nachricht.getPostfachAddress()) return Optional.ofNullable(nachricht.getPostfachAddress())
.map(PostfachAddress::getIdentifier) .map(PostfachAddress::getIdentifier)
.filter(StringBasedIdentifier.class::isInstance) .map(PostfachAddressIdentifier::getStringRepresentation)
.map(StringBasedIdentifier.class::cast)
.map(StringBasedIdentifier::getPostfachId)
.orElse(StringUtils.EMPTY); .orElse(StringUtils.EMPTY);
} }
......
...@@ -35,7 +35,6 @@ import org.mockito.Mock; ...@@ -35,7 +35,6 @@ import org.mockito.Mock;
import org.mockito.Spy; import org.mockito.Spy;
import de.ozgcloud.nachrichten.NachrichtenManagerProperties; import de.ozgcloud.nachrichten.NachrichtenManagerProperties;
import de.ozgcloud.nachrichten.postfach.PostfachAddressIdentifier;
import de.ozgcloud.nachrichten.postfach.PostfachAddressTestFactory; import de.ozgcloud.nachrichten.postfach.PostfachAddressTestFactory;
import de.ozgcloud.nachrichten.postfach.PostfachException; import de.ozgcloud.nachrichten.postfach.PostfachException;
import de.ozgcloud.nachrichten.postfach.PostfachMessageCode; import de.ozgcloud.nachrichten.postfach.PostfachMessageCode;
...@@ -138,13 +137,5 @@ class InfoManagerServiceTest { ...@@ -138,13 +137,5 @@ class InfoManagerServiceTest {
assertThat(id).isEqualTo(StringBasedIdentifierTestFactory.STRING_BASED_IDENTIFIER_POSTFACH_ID_VALUE); assertThat(id).isEqualTo(StringBasedIdentifierTestFactory.STRING_BASED_IDENTIFIER_POSTFACH_ID_VALUE);
} }
@Test
void shouldThrowExceptionForUnkownIdentifer() {
var identifier = new PostfachAddressIdentifier() {
};
var address = PostfachAddressTestFactory.createBuilder().identifier(identifier).build();
assertThatThrownBy(() -> service.getPostfachId(address)).isInstanceOf(IllegalStateException.class);
}
} }
} }
...@@ -24,18 +24,20 @@ ...@@ -24,18 +24,20 @@
unter der Lizenz sind dem Lizenztext zu entnehmen. unter der Lizenz sind dem Lizenztext zu entnehmen.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>de.ozgcloud.common</groupId> <groupId>de.ozgcloud.common</groupId>
<artifactId>ozgcloud-common-parent</artifactId> <artifactId>ozgcloud-common-parent</artifactId>
<version>4.7.0</version> <version>4.11.0</version>
</parent> </parent>
<groupId>de.ozgcloud.nachrichten</groupId> <groupId>de.ozgcloud.nachrichten</groupId>
<artifactId>nachrichten-manager</artifactId> <artifactId>nachrichten-manager</artifactId>
<version>2.17.0</version> <version>2.18.0</version>
<name>OZG-Cloud Nachrichten Manager</name> <name>OZG-Cloud Nachrichten Manager</name>
<packaging>pom</packaging> <packaging>pom</packaging>
......