X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=enrichment-coordinator-service%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fenrichment%2Frepository%2FEiTypes.java;h=5454e8a7e11ddbd633381974f5846d11a00aa542;hb=refs%2Fchanges%2F11%2F4711%2F4;hp=7668ff16f5a8430e2fc8f466e86abeb272f5010a;hpb=d1d085456c485599f6b8aba87b6d761b29c2ecd4;p=nonrtric.git diff --git a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiTypes.java b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiTypes.java index 7668ff16..5454e8a7 100644 --- a/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiTypes.java +++ b/enrichment-coordinator-service/src/main/java/org/oransc/enrichment/repository/EiTypes.java @@ -34,7 +34,7 @@ public class EiTypes { Map allEiTypes = new HashMap<>(); public synchronized void put(EiType type) { - allEiTypes.put(type.id(), type); + allEiTypes.put(type.getId(), type); } public synchronized Collection getAllEiTypes() { @@ -44,7 +44,7 @@ public class EiTypes { public synchronized EiType getType(String id) throws ServiceException { EiType type = allEiTypes.get(id); if (type == null) { - throw new ServiceException("Could not find EI Job: " + id); + throw new ServiceException("Could not find EI type: " + id); } return type; } @@ -57,6 +57,10 @@ public class EiTypes { allEiTypes.remove(id); } + public synchronized void remove(EiType type) { + this.remove(type.getId()); + } + public synchronized int size() { return allEiTypes.size(); }