package org.wickedsource.coderadar.projectadministration.service.analyzerconfig;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.wickedsource.coderadar.projectadministration.domain.AnalyzerConfiguration;
import org.wickedsource.coderadar.projectadministration.port.driven.analyzerconfig.UpdateAnalyzerConfigurationPort;
import org.wickedsource.coderadar.projectadministration.port.driver.analyzerconfig.UpdateAnalyzerConfigurationCommand;
import org.wickedsource.coderadar.projectadministration.port.driver.analyzerconfig.UpdateAnalyzerConfigurationUseCase;

@Service
public class UpdateAnalyzerConfigurationService implements UpdateAnalyzerConfigurationUseCase {

  private final UpdateAnalyzerConfigurationPort port;

  @Autowired
  public UpdateAnalyzerConfigurationService(UpdateAnalyzerConfigurationPort port) {
    this.port = port;
  }

  @Override
  public void update(
      UpdateAnalyzerConfigurationCommand command) {
    AnalyzerConfiguration analyzerConfiguration = new AnalyzerConfiguration();
    analyzerConfiguration.setId(command.getId());
    analyzerConfiguration.setAnalyzerName(command.getAnalyzerName());
    analyzerConfiguration.setEnabled(command.getEnabled());
    port.update(analyzerConfiguration);
  }
}

@@ -271,16 +271,129 @@
 ration;%0A
+import org.wickedsource.coderadar.projectadministration.port.driven.analyzerconfig.GetAnalyzerConfigurationPort;%0A
 import o
@@ -845,16 +845,91 @@
 Case %7B%0A%0A
+  private final GetAnalyzerConfigurationPort getAnalyzerConfigurationPort;%0A
   privat
@@ -968,17 +968,44 @@
 ionPort 
-p
+updateAnalyzerConfigurationP
 ort;%0A%0A  
@@ -1095,33 +1095,243 @@
 ort 
-port) %7B%0A    this.port = p
+updateAnalyzerConfigurationPort, GetAnalyzerConfigurationPort getAnalyzerConfigurationPort) %7B%0A    this.updateAnalyzerConfigurationPort = updateAnalyzerConfigurationPort;%0A    this.getAnalyzerConfigurationPort = getAnalyzerConfigurationP
 ort;
@@ -1475,13 +1475,24 @@
 on =
- new 
+%0A            get
 Anal
@@ -1512,17 +1512,17 @@
 tion
-();%0A    a
+Port.getA
 naly
@@ -1541,14 +1541,8 @@
 tion
-.setId
 (com
@@ -1690,17 +1690,44 @@
 ));%0A    
-p
+updateAnalyzerConfigurationP
 ort.upda

Modify UpdateAnalyzerConfigurationService