diff --git a/src/main/org/epics/archiverappliance/config/ConfigService.java b/src/main/org/epics/archiverappliance/config/ConfigService.java index b8937c3ee..17fb30ce8 100644 --- a/src/main/org/epics/archiverappliance/config/ConfigService.java +++ b/src/main/org/epics/archiverappliance/config/ConfigService.java @@ -210,7 +210,7 @@ public enum WAR_FILE { MGMT, RETRIEVAL, ETL, ENGINE } * For automated PV submission, IOC engineers could add .VAL, fields, aliases etc. * This method attempts to return all possible PV's that the archiver could know about. * This is a lot of names; so we take in a consumer that potentially streams a name out as quickly as possible. - * @return + * @param func A consumer of pvNames */ public void getAllExpandedNames(Consumer func); diff --git a/src/main/org/epics/archiverappliance/config/DefaultConfigService.java b/src/main/org/epics/archiverappliance/config/DefaultConfigService.java index 45a99bbf7..7dbbf0156 100644 --- a/src/main/org/epics/archiverappliance/config/DefaultConfigService.java +++ b/src/main/org/epics/archiverappliance/config/DefaultConfigService.java @@ -2009,28 +2009,34 @@ public void getAllExpandedNames(Consumer func) { // Add fields and the VAL field for(String pvName : allPVs) { func.accept(pvName); - func.accept(pvName + ".VAL"); - PVTypeInfo typeInfo = this.getTypeInfoForPV(pvName); - if(typeInfo != null) { - for(String fieldName : typeInfo.getArchiveFields()) { - func.accept(pvName + "." + fieldName); + if(!PVNames.isField(pvName)) { + func.accept(pvName + ".VAL"); + PVTypeInfo typeInfo = this.getTypeInfoForPV(pvName); + if(typeInfo != null) { + for(String fieldName : typeInfo.getArchiveFields()) { + func.accept(pvName + "." + fieldName); + } } } } List allAliases = this.getAllAliases(); for(String pvName : allAliases) { func.accept(pvName); - func.accept(pvName + ".VAL"); - PVTypeInfo typeInfo = this.getTypeInfoForPV(pvName); - if(typeInfo != null) { - for(String fieldName : typeInfo.getArchiveFields()) { - func.accept(pvName + "." + fieldName); + if(!PVNames.isField(pvName)) { + func.accept(pvName + ".VAL"); + PVTypeInfo typeInfo = this.getTypeInfoForPV(pvName); + if(typeInfo != null) { + for(String fieldName : typeInfo.getArchiveFields()) { + func.accept(pvName + "." + fieldName); + } } } } for(String pvName : this.getArchiveRequestsCurrentlyInWorkflow()) { func.accept(pvName); - func.accept(pvName + ".VAL"); + if(!PVNames.isField(pvName)) { + func.accept(pvName + ".VAL"); + } } } diff --git a/src/main/org/epics/archiverappliance/mgmt/bpl/UnarchivedPVsAction.java b/src/main/org/epics/archiverappliance/mgmt/bpl/UnarchivedPVsAction.java index f6600d542..95cef2820 100644 --- a/src/main/org/epics/archiverappliance/mgmt/bpl/UnarchivedPVsAction.java +++ b/src/main/org/epics/archiverappliance/mgmt/bpl/UnarchivedPVsAction.java @@ -41,8 +41,7 @@ public class UnarchivedPVsAction implements BPLAction { @Override public void execute(HttpServletRequest req, HttpServletResponse resp, ConfigService configService) throws IOException { logger.info("Determining PVs that are unarchived "); - LinkedList pvNamesFromUser = PVsMatchingParameter.getPVNamesFromPostBody(req, configService); - Set normalizedPVNames = new HashSet(pvNamesFromUser); + Set pvNamesFromUser = new HashSet(PVsMatchingParameter.getPVNamesFromPostBody(req, configService)); Set expandedNames = new HashSet(); configService.getAllExpandedNames(new Consumer(){ @@ -51,11 +50,11 @@ public void accept(String t) { expandedNames.add(t); } }); - normalizedPVNames.removeAll(expandedNames); + pvNamesFromUser.removeAll(expandedNames); resp.setContentType(MimeTypeConstants.APPLICATION_JSON); try (PrintWriter out = resp.getWriter()) { - JSONValue.writeJSONString(new LinkedList(normalizedPVNames), out); + JSONValue.writeJSONString(new LinkedList(pvNamesFromUser), out); } } }