X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ECOMP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fopenecomp%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcontroller%2FMicroServiceDictionaryController.java;h=b933a4f84247d918be65308c81c9c7fd73ec78d2;hb=4ca818fdfb9b807562166800a086b413593d6894;hp=108d33c25e28d9898c137b3189d8a0fae3f5cb24;hpb=fc5c07705edc4dcb7083b39116a43844bb6a1490;p=policy%2Fengine.git diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/MicroServiceDictionaryController.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/MicroServiceDictionaryController.java index 108d33c25..b933a4f84 100644 --- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/MicroServiceDictionaryController.java +++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/controller/MicroServiceDictionaryController.java @@ -62,7 +62,11 @@ public class MicroServiceDictionaryController { private static final Logger LOGGER = FlexLogger.getLogger(MicroServiceDictionaryController.class); private static CommonClassDao commonClassDao; - + + public static void setCommonClassDao(CommonClassDao commonClassDao) { + MicroServiceDictionaryController.commonClassDao = commonClassDao; + } + @Autowired public MicroServiceDictionaryController(CommonClassDao commonClassDao){ MicroServiceDictionaryController.commonClassDao = commonClassDao; @@ -1013,14 +1017,14 @@ public class MicroServiceDictionaryController { if (mainClass != null && mainClass.getDependency()==null){ mainClass.setDependency(""); } - - this.newModel.setDependency(mainClass.getDependency()); - this.newModel.setSub_attributes(subAttribute.toString()); - this.newModel.setAttributes(mainClass.getAttribute().toString().replace("{", "").replace("}", "")); - this.newModel.setRef_attributes(mainClass.getRefAttribute().toString().replace("{", "").replace("}", "")); - this.newModel.setEnumValues(mainClass.getEnumType().toString().replace("{", "").replace("}", "")); - this.newModel.setAnnotation(mainClass.getMatchingSet().toString().replace("{", "").replace("}", "")); - + if(mainClass != null){ + this.newModel.setDependency(mainClass.getDependency()); + this.newModel.setSub_attributes(subAttribute); + this.newModel.setAttributes(mainClass.getAttribute().toString().replace("{", "").replace("}", "")); + this.newModel.setRef_attributes(mainClass.getRefAttribute().toString().replace("{", "").replace("}", "")); + this.newModel.setEnumValues(mainClass.getEnumType().toString().replace("{", "").replace("}", "")); + this.newModel.setAnnotation(mainClass.getMatchingSet().toString().replace("{", "").replace("}", "")); + } } private ArrayList getFullDependencyList(ArrayList dependency) {