Skip to content
Snippets Groups Projects
Commit 0aa2cc96 authored by OZGCloud's avatar OZGCloud
Browse files

OZG-7144 fix ifmapper

parent 4d7623bf
No related branches found
No related tags found
1 merge request!1Ozg 7144 orgid lower case
...@@ -44,7 +44,7 @@ class AfmZustaendigeStelleMapper implements AfmEngineBasedMapper { ...@@ -44,7 +44,7 @@ class AfmZustaendigeStelleMapper implements AfmEngineBasedMapper {
public static final String EMAIL = "emailadresse"; public static final String EMAIL = "emailadresse";
public static final String ORGANISATIONSEINHEITEN_ID = "OrganisationseinheitenID"; public static final String ORGANISATIONSEINHEITEN_ID = "OrganisationseinheitenID";
public static final String ORGANISATIONSEINHEITEN_ID_ALT = "organisationseinheitid"; public static final String ORGANISATIONSEINHEITEN_ID_ALT = "organisationseinheitid";
public static final String ORGANISATIONSEINHEITEN_ID_PARAMETER = "CUSTOMPARAMETER_ORGANISATIONEINHEITENID"; public static final String ORGANISATIONSEINHEITEN_ID_PARAMETER = "CUSTOMPARAMETER_ORGANISATIONSEINHEITENID";
public static final String TAG_BEZEICHNUNG = "OrganisationseinheitenBEZEICHNUNG"; public static final String TAG_BEZEICHNUNG = "OrganisationseinheitenBEZEICHNUNG";
@Autowired @Autowired
......
...@@ -41,8 +41,7 @@ public class IntelliFormRepresentationAdapter { ...@@ -41,8 +41,7 @@ public class IntelliFormRepresentationAdapter {
"t:customer", "t:customer",
"t:customer-id", "t:customer-id",
"t:client", "t:client",
"t:client-id" "t:client-id");
);
public static final List<String> CUSTOM_HEADER_ATTRIBUTE_NAMES = List.of( public static final List<String> CUSTOM_HEADER_ATTRIBUTE_NAMES = List.of(
"u:saml_legacypostkorbhandle", "u:saml_legacypostkorbhandle",
"u:saml_givenname", "u:saml_givenname",
...@@ -54,15 +53,13 @@ public class IntelliFormRepresentationAdapter { ...@@ -54,15 +53,13 @@ public class IntelliFormRepresentationAdapter {
"u:saml_postaladdress", "u:saml_postaladdress",
"u:saml_postalcode", "u:saml_postalcode",
"u:saml_localityname", "u:saml_localityname",
ServiceKontoFactory.KEY_BAYERN_ID_TRUST_LEVEL ServiceKontoFactory.KEY_BAYERN_ID_TRUST_LEVEL);
);
private static final Collector<Map.Entry<String, ?>, ?, Map<String, Object>> ORDERED_MAP_ENTRY_COLLECTOR = Collectors.toMap( private static final Collector<Map.Entry<String, ?>, ?, Map<String, Object>> ORDERED_MAP_ENTRY_COLLECTOR = Collectors.toMap(
Map.Entry::getKey, Map.Entry::getKey,
Map.Entry::getValue, Map.Entry::getValue,
(u, v) -> v, (u, v) -> v,
LinkedHashMap::new LinkedHashMap::new);
);
private final XmlToJavaMapsMapper xmlToJavaMapsMapper; private final XmlToJavaMapsMapper xmlToJavaMapsMapper;
...@@ -97,15 +94,14 @@ public class IntelliFormRepresentationAdapter { ...@@ -97,15 +94,14 @@ public class IntelliFormRepresentationAdapter {
var document = findIntelliFormXMLRepresentation(formData) var document = findIntelliFormXMLRepresentation(formData)
.orElseThrow(() -> new TechnicalException("Expect to find IntelliForm XML representation!")); .orElseThrow(() -> new TechnicalException("Expect to find IntelliForm XML representation!"));
return FormData.builder() return formData.toBuilder()
.representations(formData.getRepresentations()) .representations(formData.getRepresentations())
.attachments(formData.getAttachments()) .attachments(formData.getAttachments())
.formData(Stream.concat( .formData(Stream.concat(
getFormDataEntriesFromDocument(document, formData.getAttachments()), getFormDataEntriesFromDocument(document, formData.getAttachments()),
Map.of( Map.of(
HEADER_FIELD, createHeaderMap(document) HEADER_FIELD, createHeaderMap(document)).entrySet().stream())
).entrySet().stream() .collect(ORDERED_MAP_ENTRY_COLLECTOR))
).collect(ORDERED_MAP_ENTRY_COLLECTOR))
.build(); .build();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment