@Override public IDeviceAssignment deleteDeviceAssignment(String token, boolean force) throws SiteWhereException { return delegate.deleteDeviceAssignment(token, force); }
@Override public IDeviceAssignment deleteDeviceAssignment(UUID id) throws SiteWhereException { return getDelegate().deleteDeviceAssignment(id); }
@Override public void deleteDeviceAssignment(GDeleteDeviceAssignmentRequest request, StreamObserver<GDeleteDeviceAssignmentResponse> responseObserver) { try { GrpcUtils.handleServerMethodEntry(this, DeviceManagementGrpc.getDeleteDeviceAssignmentMethod()); IDeviceAssignment apiResult = getDeviceManagement() .deleteDeviceAssignment(CommonModelConverter.asApiUuid(request.getId())); GDeleteDeviceAssignmentResponse.Builder response = GDeleteDeviceAssignmentResponse.newBuilder(); response.setAssignment(DeviceModelConverter.asGrpcDeviceAssignment(apiResult)); responseObserver.onNext(response.build()); responseObserver.onCompleted(); } catch (Throwable e) { GrpcUtils.handleServerMethodException(DeviceManagementGrpc.getDeleteDeviceAssignmentMethod(), e, responseObserver); } finally { GrpcUtils.handleServerMethodExit(DeviceManagementGrpc.getDeleteDeviceAssignmentMethod()); } }
try { IDeviceAssignment assignment = SiteWhere.getServer().getDeviceManagement(getTenant(servletRequest)) .deleteDeviceAssignment(token, force); DeviceAssignmentMarshalHelper helper = new DeviceAssignmentMarshalHelper(getTenant(servletRequest)); helper.setIncludeAsset(true);