Commit 4fcd2b9b authored by dietricf's avatar dietricf
Browse files

SI-3052

parent a11f8fb9
...@@ -43,6 +43,7 @@ public final class Constants { ...@@ -43,6 +43,7 @@ public final class Constants {
public static final String CHANNEL_NOT_EXISTING = "channel.not.existing"; public static final String CHANNEL_NOT_EXISTING = "channel.not.existing";
public static final String PUBLICATION_CHANNEL_MAIL = "Mail"; 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"; public static final String FREETEXT_ADDRESS_TYPE="freetext";
......
...@@ -63,6 +63,8 @@ import java.util.Set; ...@@ -63,6 +63,8 @@ import java.util.Set;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static org.eclipse.openk.gridfailureinformation.constants.Constants.PUBLICATION_CHANNEL_OWNDMZ;
@Service @Service
@Log4j2 @Log4j2
@Validated @Validated
...@@ -223,6 +225,7 @@ public class ExportService { ...@@ -223,6 +225,7 @@ public class ExportService {
List<FailureInformationDto> failureInfoDtossVeroeffentlicht = tblFailureInfosVeroeffentlicht.stream() List<FailureInformationDto> failureInfoDtossVeroeffentlicht = tblFailureInfosVeroeffentlicht.stream()
.filter( x -> currTableViewUuidSet.contains(x.getUuid())) .filter( x -> currTableViewUuidSet.contains(x.getUuid()))
.filter( this::hasSITWebComponentChannel)
.map( failureInformationMapper::toFailureInformationDto ) .map( failureInformationMapper::toFailureInformationDto )
.map( failureInformationService::enrichFailureInfo ) .map( failureInformationService::enrichFailureInfo )
.collect(Collectors.toList()); .collect(Collectors.toList());
...@@ -235,7 +238,13 @@ public class ExportService { ...@@ -235,7 +238,13 @@ public class ExportService {
} }
} }
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 { try {
sitCacheApi.postFeSettings(settingsService.getFESettings()); sitCacheApi.postFeSettings(settingsService.getFESettings());
} catch (Exception e) { } catch (Exception e) {
......
...@@ -40,6 +40,9 @@ spring: ...@@ -40,6 +40,9 @@ spring:
- name: Störungsauskunft.de - name: Störungsauskunft.de
exportQueue: sit_stoerungsauskunft_export_queue exportQueue: sit_stoerungsauskunft_export_queue
exportKey: sit_stoerungsauskunft_export_key exportKey: sit_stoerungsauskunft_export_key
- name: Störinfotool-eigene-Web-Komponenten
exportQueue: sit_own_export_queue
exportKey: sit_own_export_key
# UI Setting (Map) # UI Setting (Map)
settings: settings:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment