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 { ...@@ -80,6 +80,7 @@ public class ConversionUtil {
private static final String CHANNEL_IOC_NAME_KEY = "iocName"; private static final String CHANNEL_IOC_NAME_KEY = "iocName";
private static final String CHANNEL_HOST_NAME_KEY = "hostName"; private static final String CHANNEL_HOST_NAME_KEY = "hostName";
private static final String CHANNEL_PV_STATUS_KEY = "pvStatus"; 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"; private static final String CHANNEL_IOC_VERSION_KEY = "IOCVERSION";
//not intended to be instantiated //not intended to be instantiated
...@@ -811,6 +812,9 @@ public class ConversionUtil { ...@@ -811,6 +812,9 @@ public class ConversionUtil {
.map(Property::getValue).orElse(null)), .map(Property::getValue).orElse(null)),
channel.getProperties().stream() channel.getProperties().stream()
.filter(p -> StringUtils.equals(p.getName(), CHANNEL_IOC_VERSION_KEY)).findFirst() .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) .map(Property::getValue).orElse(null)
); );
} }
...@@ -835,6 +839,9 @@ public class ConversionUtil { ...@@ -835,6 +839,9 @@ public class ConversionUtil {
channel.getProperties().stream() channel.getProperties().stream()
.filter(p -> StringUtils.equals(p.getName(), CHANNEL_IOC_VERSION_KEY)).findFirst() .filter(p -> StringUtils.equals(p.getName(), CHANNEL_IOC_VERSION_KEY)).findFirst()
.map(Property::getValue).orElse(null), .map(Property::getValue).orElse(null),
channel.getProperties().stream()
.filter(p -> StringUtils.equals(p.getName(), CHANNEL_DESCRIPTION_KEY)).findFirst()
.map(Property::getValue).orElse(null),
iocId, iocId,
hostId, hostId,
channel.getProperties().stream().filter(p -> !specialKeys.contains(p.getName())).collect( channel.getProperties().stream().filter(p -> !specialKeys.contains(p.getName())).collect(
......
...@@ -29,13 +29,15 @@ public class Record { ...@@ -29,13 +29,15 @@ public class Record {
private final String hostName; private final String hostName;
private final PVStatus pvStatus; private final PVStatus pvStatus;
private final String iocVersion; 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.name = name;
this.iocName = iocName; this.iocName = iocName;
this.hostName = hostName; this.hostName = hostName;
this.pvStatus = pvStatus; this.pvStatus = pvStatus;
this.iocVersion = iocVersion; this.iocVersion = iocVersion;
this.description = description;
} }
public String getName() { public String getName() {
...@@ -57,4 +59,8 @@ public class Record { ...@@ -57,4 +59,8 @@ public class Record {
public String getIocVersion() { public String getIocVersion() {
return iocVersion; return iocVersion;
} }
public String getDescription() {
return description;
}
} }
...@@ -30,8 +30,8 @@ public class RecordDetails extends Record { ...@@ -30,8 +30,8 @@ public class RecordDetails extends Record {
private final Long hostCSentryId; private final Long hostCSentryId;
private final Map<String, String> properties; private final Map<String, String> properties;
public RecordDetails(String name, String iocName, String hostName, PVStatus pvStatus, String iocVersion, public RecordDetails(String name, String iocName, String hostName, PVStatus pvStatus, String iocVersion,
Long iocId, long hostCSentryId, Map<String, String> properties) { String description, Long iocId, Long hostCSentryId, Map<String, String> properties) {
super(name, iocName, hostName, pvStatus, iocVersion); super(name, iocName, hostName, pvStatus, iocVersion, description);
this.iocId = iocId; this.iocId = iocId;
this.hostCSentryId = hostCSentryId; this.hostCSentryId = hostCSentryId;
this.properties = properties; 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