resolve issues due to conflict
[clamp.git] / src / main / java / org / onap / clamp / clds / sdc / controller / SdcSingleController.java
index 387548f..f8fef39 100644 (file)
@@ -49,19 +49,15 @@ import org.openecomp.sdc.impl.DistributionClientFactory;
 import org.openecomp.sdc.tosca.parser.exceptions.SdcToscaParserException;\r
 import org.openecomp.sdc.utils.DistributionActionResultEnum;\r
 import org.openecomp.sdc.utils.DistributionStatusEnum;\r
-import org.springframework.beans.factory.annotation.Autowired;\r
 \r
 /**\r
- * This class handles one sdc controller defined in the config. It's\r
- * instantiated by Spring config.\r
+ * This class handles one sdc controller defined in the config.\r
  */\r
 public class SdcSingleController {\r
 \r
     private static final EELFLogger logger = EELFManager.getInstance().getLogger(SdcSingleController.class);\r
     protected boolean isAsdcClientAutoManaged = false;\r
-    @Autowired\r
-    protected CsarInstaller resourceInstaller;\r
-    @Autowired\r
+    protected CsarInstaller csarInstaller;\r
     protected ClampProperties refProp;\r
     public static final String CONFIG_SDC_FOLDER = "sdc.csarFolder";\r
 \r
@@ -129,9 +125,12 @@ public class SdcSingleController {
     protected SdcSingleControllerConfiguration sdcConfig;\r
     private IDistributionClient distributionClient;\r
 \r
-    public SdcSingleController(SdcSingleControllerConfiguration sdcSingleConfig, boolean isClientAutoManaged) {\r
+    public SdcSingleController(ClampProperties clampProp, CsarInstaller csarInstaller,\r
+            SdcSingleControllerConfiguration sdcSingleConfig, boolean isClientAutoManaged) {\r
         this.isAsdcClientAutoManaged = isClientAutoManaged;\r
-        sdcConfig = sdcSingleConfig;\r
+        this.sdcConfig = sdcSingleConfig;\r
+        this.refProp = clampProp;\r
+        this.csarInstaller = csarInstaller;\r
     }\r
 \r
     /**\r
@@ -206,12 +205,12 @@ public class SdcSingleController {
             this.changeControllerStatus(SdcSingleControllerStatus.BUSY);\r
             csar = new CsarHandler(iNotif, this.sdcConfig.getSdcControllerName(),\r
                     refProp.getStringValue(CONFIG_SDC_FOLDER));\r
-            if (resourceInstaller.isCsarAlreadyDeployed(csar)) {\r
+            if (csarInstaller.isCsarAlreadyDeployed(csar)) {\r
                 csar.save(downloadTheArtifact(csar.getArtifactElement()));\r
                 this.sendASDCNotification(NotificationType.DOWNLOAD, csar.getArtifactElement().getArtifactURL(),\r
                         sdcConfig.getConsumerID(), iNotif.getDistributionID(), DistributionStatusEnum.DOWNLOAD_OK, null,\r
                         System.currentTimeMillis());\r
-                resourceInstaller.installTheCsar(csar);\r
+                csarInstaller.installTheCsar(csar);\r
                 this.sendASDCNotification(NotificationType.DEPLOY, csar.getArtifactElement().getArtifactURL(),\r
                         sdcConfig.getConsumerID(), iNotif.getDistributionID(), DistributionStatusEnum.DEPLOY_OK, null,\r
                         System.currentTimeMillis());\r