SI-3052
diff --git a/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/constants/Constants.java b/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/constants/Constants.java
index c67d851..0162baa 100644
--- a/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/constants/Constants.java
+++ b/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/constants/Constants.java
@@ -43,6 +43,7 @@
public static final String CHANNEL_NOT_EXISTING = "channel.not.existing";
public static final String PUBLICATION_CHANNEL_MAIL = "Mail";
+ public static final String PUBLICATION_CHANNEL_OWNDMZ = "Störinfotool-eigene-Web-Komponenten";
public static final String FREETEXT_ADDRESS_TYPE="freetext";
diff --git a/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/service/ExportService.java b/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/service/ExportService.java
index fdb70f8..1c4bfed 100644
--- a/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/service/ExportService.java
+++ b/gfsBackendService/src/main/java/org/eclipse/openk/gridfailureinformation/service/ExportService.java
@@ -63,6 +63,8 @@
import java.util.UUID;
import java.util.stream.Collectors;
+import static org.eclipse.openk.gridfailureinformation.constants.Constants.PUBLICATION_CHANNEL_OWNDMZ;
+
@Service
@Log4j2
@Validated
@@ -223,6 +225,7 @@
List<FailureInformationDto> failureInfoDtossVeroeffentlicht = tblFailureInfosVeroeffentlicht.stream()
.filter( x -> currTableViewUuidSet.contains(x.getUuid()))
+ .filter( this::hasSITWebComponentChannel)
.map( failureInformationMapper::toFailureInformationDto )
.map( failureInformationService::enrichFailureInfo )
.collect(Collectors.toList());
@@ -235,7 +238,13 @@
}
}
- public void exportFeSettingsToDMZ(){
+ private boolean hasSITWebComponentChannel(TblFailureInformation x) {
+ return publicationChannelRepository.findByTblFailureInformation(x).stream()
+ .map(TblFailureInformationPublicationChannel::getPublicationChannel)
+ .anyMatch( PUBLICATION_CHANNEL_OWNDMZ::equalsIgnoreCase);
+ }
+
+ public void exportFeSettingsToDMZ(){
try {
sitCacheApi.postFeSettings(settingsService.getFESettings());
} catch (Exception e) {
diff --git a/gfsBackendService/src/main/resources/application.yml b/gfsBackendService/src/main/resources/application.yml
index fd57998..21d38aa 100644
--- a/gfsBackendService/src/main/resources/application.yml
+++ b/gfsBackendService/src/main/resources/application.yml
@@ -40,6 +40,9 @@
- name: Störungsauskunft.de
exportQueue: sit_stoerungsauskunft_export_queue
exportKey: sit_stoerungsauskunft_export_key
+ - name: Störinfotool-eigene-Web-Komponenten
+ exportQueue: sit_own_export_queue
+ exportKey: sit_own_export_key
# UI Setting (Map)
settings: