use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.configuration.AdministrativeStatusType in project open-smart-grid-platform by OSGP.
the class SmartMeteringConfigurationEndpoint method retrieveGetAdministrativeStatusResponse.
@PayloadRoot(localPart = "GetAdministrativeStatusAsyncRequest", namespace = SMARTMETER_CONFIGURATION_NAMESPACE)
@ResponsePayload
public GetAdministrativeStatusResponse retrieveGetAdministrativeStatusResponse(@RequestPayload final GetAdministrativeStatusAsyncRequest request) throws OsgpException {
GetAdministrativeStatusResponse response = null;
try {
final ResponseData responseData = this.responseDataService.get(request.getCorrelationUid(), ComponentType.WS_SMART_METERING);
this.throwExceptionIfResultNotOk(responseData, "retrieving the administrative status");
response = new GetAdministrativeStatusResponse();
final AdministrativeStatusType dataRequest = this.configurationMapper.map(responseData.getMessageData(), AdministrativeStatusType.class);
response.setEnabled(dataRequest);
} catch (final Exception e) {
this.handleException(e);
}
return response;
}
Aggregations