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

SI-3052

parent a11f8fb9
......@@ -43,6 +43,7 @@ public final class Constants {
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";
......
......@@ -63,6 +63,8 @@ import java.util.Set;
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 @@ public class ExportService {
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 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 {
sitCacheApi.postFeSettings(settingsService.getFESettings());
} catch (Exception e) {
......
......@@ -40,6 +40,9 @@ spring:
- 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:
......
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