use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.DecoupleMbusDeviceByChannelRequest in project open-smart-grid-platform by OSGP.
the class DecoupleMbusDeviceByChannelRequestFactory method fromGatewayAndChannel.
public static DecoupleMbusDeviceByChannelRequest fromGatewayAndChannel(final String gatewayDeviceIdentification, final String channel) {
final DecoupleMbusDeviceByChannelRequest request = new DecoupleMbusDeviceByChannelRequest();
request.setDeviceIdentification(gatewayDeviceIdentification);
final DecoupleMbusDeviceByChannelRequestData requestData = new DecoupleMbusDeviceByChannelRequestData();
requestData.setChannel(Short.parseShort(channel));
request.setDecoupleMbusDeviceByChannelRequestData(requestData);
return request;
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.DecoupleMbusDeviceByChannelRequest in project open-smart-grid-platform by OSGP.
the class DecoupleMbusDeviceByChannelSteps method theDecoupleGMeterFromEMeterRequestIsReceivedForAnUnknownDevice.
@When("^the Decouple M-Bus Device By Channel \"([^\"]*)\" from E-meter \"([^\"]*)\" request is received for an unknown gateway$")
public void theDecoupleGMeterFromEMeterRequestIsReceivedForAnUnknownDevice(final String channel, final String eMeter) throws WebServiceSecurityException {
final DecoupleMbusDeviceByChannelRequest request = DecoupleMbusDeviceByChannelRequestFactory.fromGatewayAndChannel(eMeter, channel);
try {
this.smartMeteringInstallationClient.decoupleMbusDeviceByChannel(request);
fail("A SoapFaultClientException should be thrown");
} catch (final SoapFaultClientException e) {
ScenarioContext.current().put(PlatformKeys.RESPONSE, e);
}
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.DecoupleMbusDeviceByChannelRequest in project open-smart-grid-platform by OSGP.
the class DecoupleMbusDeviceByChannelSteps method theDeCoupleMbusDeviceByChannelFromEmeterRequestIsReceived.
@When("^the Decouple M-Bus Device By Channel \"([^\"]*)\" from E-meter \"([^\"]*)\" request is received$")
public void theDeCoupleMbusDeviceByChannelFromEmeterRequestIsReceived(final String channel, final String eMeter) throws WebServiceSecurityException {
final DecoupleMbusDeviceByChannelRequest request = DecoupleMbusDeviceByChannelRequestFactory.fromGatewayAndChannel(eMeter, channel);
final DecoupleMbusDeviceByChannelAsyncResponse asyncResponse = this.smartMeteringInstallationClient.decoupleMbusDeviceByChannel(request);
this.checkAndSaveCorrelationId(asyncResponse.getCorrelationUid());
}
use of org.opensmartgridplatform.adapter.ws.schema.smartmetering.installation.DecoupleMbusDeviceByChannelRequest in project open-smart-grid-platform by OSGP.
the class DecoupleMbusDeviceByChannelRequestFactory method fromSettings.
public static DecoupleMbusDeviceByChannelRequest fromSettings(final Map<String, String> settings) {
final DecoupleMbusDeviceByChannelRequest request = new DecoupleMbusDeviceByChannelRequest();
final DecoupleMbusDeviceByChannelRequestData requestData = new DecoupleMbusDeviceByChannelRequestData();
requestData.setChannel(Short.valueOf(settings.get(PlatformKeys.KEY_CHANNEL)));
request.setDecoupleMbusDeviceByChannelRequestData(requestData);
request.setDeviceIdentification(settings.get(PlatformKeys.KEY_DEVICE_IDENTIFICATION));
return request;
}
Aggregations