use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GenerateAndReplaceKeysRequest in project open-smart-grid-platform by OSGP.
the class ReplaceKeysSteps method multipleGenerateAndReplaceKeysRequestsAreReceived.
@When("multiple generate and replace keys requests are received")
public void multipleGenerateAndReplaceKeysRequestsAreReceived(final Map<String, String> settings) throws Throwable {
final List<Map<String, String>> listOfSettingsPerRequest = this.createSettingPerRequest(settings);
final List<String> correlationUIDs = new ArrayList<>();
for (final Map<String, String> settingsPerRequest : listOfSettingsPerRequest) {
final GenerateAndReplaceKeysRequest request = GenerateAndReplaceKeysRequestFactory.fromParameterMap(settingsPerRequest);
final GenerateAndReplaceKeysAsyncResponse asyncResponse = this.smartMeteringConfigurationClient.generateAndReplaceKeys(request);
correlationUIDs.add(asyncResponse.getCorrelationUid());
}
ScenarioContext.current().put(PlatformKeys.KEY_CORRELATION_UID, correlationUIDs);
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GenerateAndReplaceKeysRequest in project open-smart-grid-platform by OSGP.
the class GenerateAndReplaceKeysRequestFactory method fromParameterMap.
public static GenerateAndReplaceKeysRequest fromParameterMap(final Map<String, String> requestParameters) {
final GenerateAndReplaceKeysRequest generateAndReplaceKeysRequest = new GenerateAndReplaceKeysRequest();
generateAndReplaceKeysRequest.setDeviceIdentification(getString(requestParameters, PlatformKeys.KEY_DEVICE_IDENTIFICATION, PlatformDefaults.DEFAULT_DEVICE_IDENTIFICATION));
return generateAndReplaceKeysRequest;
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.GenerateAndReplaceKeysRequest in project open-smart-grid-platform by OSGP.
the class ReplaceKeysSteps method theGenerateAndReplaceKeysRequestIsReceived.
@When("^the generate and replace keys request is received$")
public void theGenerateAndReplaceKeysRequestIsReceived(final Map<String, String> settings) throws Throwable {
ScenarioContext.current().put(PlatformKeys.KEY_DEVICE_IDENTIFICATION, settings.get(PlatformKeys.KEY_DEVICE_IDENTIFICATION));
final GenerateAndReplaceKeysRequest request = GenerateAndReplaceKeysRequestFactory.fromParameterMap(settings);
final GenerateAndReplaceKeysAsyncResponse asyncResponse = this.smartMeteringConfigurationClient.generateAndReplaceKeys(request);
ScenarioContext.current().put(PlatformKeys.KEY_CORRELATION_UID, asyncResponse.getCorrelationUid());
}
Aggregations