Fix the policy_id not set
[clamp.git] / src / main / java / org / onap / clamp / clds / tosca / update / execution / ToscaMetadataExecutor.java
index dbd8ee1..885e755 100644 (file)
@@ -32,8 +32,6 @@ import javax.annotation.PostConstruct;
 import org.onap.clamp.clds.tosca.update.execution.cds.ToscaMetadataCdsProcess;
 import org.onap.clamp.clds.tosca.update.execution.target.ToscaMetadataTargetProcess;
 import org.onap.clamp.loop.service.Service;
-import org.onap.clamp.tosca.Dictionary;
-import org.onap.clamp.tosca.DictionaryElement;
 import org.onap.clamp.tosca.DictionaryService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
@@ -53,7 +51,7 @@ public class ToscaMetadataExecutor {
     private Map<String, ToscaMetadataProcess> mapOfProcesses = new HashMap<>();
 
     /**
-     * This method executes the required process specified in processInfo
+     * This method executes the required process specified in processInfo.
      *
      * @param processInfo  A String containing the process to execute, like "cds/param1:value1/param2:value2"
      * @param childObject  The jsonObject
@@ -63,7 +61,8 @@ public class ToscaMetadataExecutor {
         String[] processParameters = (processInfo + "/ ").split("/");
         logger.info("Executing the Tosca clamp process " + processParameters[0] + " with parameters "
                 + processParameters[1].trim());
-        mapOfProcesses.get(processParameters[0]).executeProcess(processParameters[1].trim(), childObject, serviceModel);
+        mapOfProcesses.get(processParameters[0].trim())
+                .executeProcess(processParameters[1].trim(), childObject, serviceModel);
     }
 
     /**
@@ -73,38 +72,5 @@ public class ToscaMetadataExecutor {
     public void init() {
         mapOfProcesses.put("CDS", new ToscaMetadataCdsProcess());
         mapOfProcesses.put("CSAR_RESOURCES", new ToscaMetadataTargetProcess());
-
-        preProvisionDictionaryTable();
     }
-
-    private void preProvisionDictionaryTable() {
-        // Set up dictionary elements
-        Dictionary actorDictionary = new Dictionary();
-        actorDictionary.setName("DefaultActor");
-        actorDictionary.setSecondLevelDictionary(0);
-        actorDictionary.setSubDictionaryType("");
-
-        DictionaryElement elementSo = new DictionaryElement();
-        elementSo.setName("SO");
-        elementSo.setShortName("SO");
-        elementSo.setType("string");
-        elementSo.setDescription("SO component");
-        actorDictionary.addDictionaryElements(elementSo);
-
-        DictionaryElement elementSdnc = new DictionaryElement();
-        elementSdnc.setName("SDNC");
-        elementSdnc.setShortName("SDNC");
-        elementSdnc.setType("string");
-        elementSdnc.setDescription("SDNC component");
-        actorDictionary.addDictionaryElements(elementSdnc);
-
-        DictionaryElement elementCds = new DictionaryElement();
-        elementCds.setName("CDS");
-        elementCds.setShortName("CDS");
-        elementCds.setType("string");
-        elementCds.setDescription("CDS component");
-        actorDictionary.addDictionaryElements(elementCds);
-
-        dictionaryService.saveOrUpdateDictionary(actorDictionary);
-   }
 }