use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetAdministrativeStatusRequest in project open-smart-grid-platform by OSGP.
the class SetAdministrativeStatus method theSetAdministrativeStatusRequestIsReceived.
@When("^the set administrative status request is received$")
public void theSetAdministrativeStatusRequestIsReceived(final Map<String, String> requestData) throws Throwable {
final SetAdministrativeStatusRequest setAdministrativeStatusRequest = SetAdministrativeStatusRequestFactory.fromParameterMap(requestData);
final SetAdministrativeStatusAsyncResponse setAdministrativeStatusAsyncResponse = this.smartMeteringConfigurationClient.setAdministrativeStatus(setAdministrativeStatusRequest);
LOGGER.info("Set administrative status response is received {}", setAdministrativeStatusAsyncResponse);
assertThat(setAdministrativeStatusAsyncResponse).as("Set administrative status response should not be null").isNotNull();
ScenarioContext.current().put(PlatformSmartmeteringKeys.KEY_CORRELATION_UID, setAdministrativeStatusAsyncResponse.getCorrelationUid());
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.SetAdministrativeStatusRequest in project open-smart-grid-platform by OSGP.
the class SetAdministrativeStatusRequestFactory method fromParameterMap.
public static SetAdministrativeStatusRequest fromParameterMap(final Map<String, String> requestParameters) {
final SetAdministrativeStatusRequest setAdministrativeStatusRequest = new SetAdministrativeStatusRequest();
setAdministrativeStatusRequest.setDeviceIdentification(requestParameters.get(PlatformSmartmeteringKeys.KEY_DEVICE_IDENTIFICATION));
setAdministrativeStatusRequest.setEnabled(AdministrativeStatusType.valueOf(requestParameters.get(PlatformSmartmeteringKeys.ADMINISTRATIVE_STATUS_TYPE)));
return setAdministrativeStatusRequest;
}
Aggregations