@Override public IDevice updateDevice(String hardwareId, IDeviceCreateRequest request) throws SiteWhereException { return delegate.updateDevice(hardwareId, request); }
@Override public IDevice updateDevice(UUID id, IDeviceCreateRequest request) throws SiteWhereException { return getDelegate().updateDevice(id, request); }
/** * Update an existing device. * * @param device * @param builder * @return * @throws SiteWhereException */ public IDevice update(IDevice device, DeviceCreateRequest.Builder builder) throws SiteWhereException { return getDeviceManagement().updateDevice(device.getId(), builder.build()); }
public IDevice update(IDevice device, DeviceCreateRequest.Builder builder) throws SiteWhereException { return getDeviceManagement().updateDevice(device.getHardwareId(), builder.build()); }
DeviceCreateRequest nested = new DeviceCreateRequest(); nested.setRemoveParentHardwareId(true); management.updateDevice(mapped.getId(), nested); IDevice updated = management.updateDevice(device.getId(), update); return updated;
DeviceCreateRequest nested = new DeviceCreateRequest(); nested.setRemoveParentHardwareId(true); management.updateDevice(mapped.getHardwareId(), nested); IDevice updated = management.updateDevice(hardwareId, update); return updated;
@Override public void updateDevice(GUpdateDeviceRequest request, StreamObserver<GUpdateDeviceResponse> responseObserver) { try { GrpcUtils.handleServerMethodEntry(this, DeviceManagementGrpc.getUpdateDeviceMethod()); IDeviceCreateRequest apiRequest = DeviceModelConverter.asApiDeviceCreateRequest(request.getRequest()); IDevice apiResult = getDeviceManagement().updateDevice(CommonModelConverter.asApiUuid(request.getId()), apiRequest); GUpdateDeviceResponse.Builder response = GUpdateDeviceResponse.newBuilder(); response.setDevice(DeviceModelConverter.asGrpcDevice(apiResult)); responseObserver.onNext(response.build()); responseObserver.onCompleted(); } catch (Throwable e) { GrpcUtils.handleServerMethodException(DeviceManagementGrpc.getUpdateDeviceMethod(), e, responseObserver); } finally { GrpcUtils.handleServerMethodExit(DeviceManagementGrpc.getUpdateDeviceMethod()); } }
management.updateDevice(mapped.getHardwareId(), nested); IDevice updated = management.updateDevice(hardwareId, update); return updated;
management.updateDevice(mapped.getId(), nested); IDevice updated = management.updateDevice(device.getId(), update); return updated;
try { IDevice result = SiteWhere.getServer().getDeviceManagement(getTenant(servletRequest)) .updateDevice(hardwareId, request); DeviceMarshalHelper helper = new DeviceMarshalHelper(getTenant(servletRequest)); helper.setIncludeAsset(true);
DeviceCreateRequest deviceUpdate = new DeviceCreateRequest(); deviceUpdate.setMetadata(request.getMetadata()); device = SiteWhere.getServer().getDeviceManagement(getTenant()).updateDevice(request.getHardwareId(), deviceUpdate);
} else { getLogger().info("Found existing device registration. Updating device information."); return getDeviceManagement().updateDevice(device.getId(), request);