Skip to content
Snippets Groups Projects
Commit 1d4a8cd6 authored by Domonkos Gulyas's avatar Domonkos Gulyas
Browse files

Merge branch 'CE-1930_Fetch_description_field' into 'develop'

CE-1930 Fetch description field too from Channel finder

See merge request !319
parents bd9e1eed cab2069c
No related branches found
No related tags found
2 merge requests!355CE-2141: 3.0,!319CE-1930 Fetch description field too from Channel finder
Pipeline #156898 passed
......@@ -80,6 +80,7 @@ public class ConversionUtil {
private static final String CHANNEL_IOC_NAME_KEY = "iocName";
private static final String CHANNEL_HOST_NAME_KEY = "hostName";
private static final String CHANNEL_PV_STATUS_KEY = "pvStatus";
private static final String CHANNEL_DESCRIPTION_KEY = "DESCRIPTION";
private static final String CHANNEL_IOC_VERSION_KEY = "IOCVERSION";
//not intended to be instantiated
......@@ -811,6 +812,9 @@ public class ConversionUtil {
.map(Property::getValue).orElse(null)),
channel.getProperties().stream()
.filter(p -> StringUtils.equals(p.getName(), CHANNEL_IOC_VERSION_KEY)).findFirst()
.map(Property::getValue).orElse(null),
channel.getProperties().stream()
.filter(p -> StringUtils.equals(p.getName(), CHANNEL_DESCRIPTION_KEY)).findFirst()
.map(Property::getValue).orElse(null)
);
}
......@@ -835,6 +839,9 @@ public class ConversionUtil {
channel.getProperties().stream()
.filter(p -> StringUtils.equals(p.getName(), CHANNEL_IOC_VERSION_KEY)).findFirst()
.map(Property::getValue).orElse(null),
channel.getProperties().stream()
.filter(p -> StringUtils.equals(p.getName(), CHANNEL_DESCRIPTION_KEY)).findFirst()
.map(Property::getValue).orElse(null),
iocId,
hostId,
channel.getProperties().stream().filter(p -> !specialKeys.contains(p.getName())).collect(
......
......@@ -29,13 +29,15 @@ public class Record {
private final String hostName;
private final PVStatus pvStatus;
private final String iocVersion;
private final String description;
public Record(String name, String iocName, String hostName, PVStatus pvStatus, String iocVersion) {
public Record(String name, String iocName, String hostName, PVStatus pvStatus, String iocVersion, String description) {
this.name = name;
this.iocName = iocName;
this.hostName = hostName;
this.pvStatus = pvStatus;
this.iocVersion = iocVersion;
this.description = description;
}
public String getName() {
......@@ -57,4 +59,8 @@ public class Record {
public String getIocVersion() {
return iocVersion;
}
public String getDescription() {
return description;
}
}
......@@ -30,8 +30,8 @@ public class RecordDetails extends Record {
private final Long hostCSentryId;
private final Map<String, String> properties;
public RecordDetails(String name, String iocName, String hostName, PVStatus pvStatus, String iocVersion,
Long iocId, long hostCSentryId, Map<String, String> properties) {
super(name, iocName, hostName, pvStatus, iocVersion);
String description, Long iocId, Long hostCSentryId, Map<String, String> properties) {
super(name, iocName, hostName, pvStatus, iocVersion, description);
this.iocId = iocId;
this.hostCSentryId = hostCSentryId;
this.properties = properties;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment