@Override public List<IDeviceGroupElement> removeDeviceGroupElements(String groupToken, List<IDeviceGroupElementCreateRequest> elements) throws SiteWhereException { return delegate.removeDeviceGroupElements(groupToken, elements); }
@Override public List<IDeviceGroupElement> removeDeviceGroupElements(List<UUID> elements) throws SiteWhereException { return getDelegate().removeDeviceGroupElements(elements); }
@Override public void removeDeviceGroupElements(GRemoveDeviceGroupElementsRequest request, StreamObserver<GRemoveDeviceGroupElementsResponse> responseObserver) { try { GrpcUtils.handleServerMethodEntry(this, DeviceManagementGrpc.getRemoveDeviceGroupElementsMethod()); List<IDeviceGroupElement> apiResult = getDeviceManagement() .removeDeviceGroupElements(CommonModelConverter.asApiUuids(request.getElementIdsList())); GRemoveDeviceGroupElementsResponse.Builder response = GRemoveDeviceGroupElementsResponse.newBuilder(); for (IDeviceGroupElement apiElement : apiResult) { response.addElements(DeviceModelConverter.asGrpcDeviceGroupElement(apiElement)); } responseObserver.onNext(response.build()); responseObserver.onCompleted(); } catch (Throwable e) { GrpcUtils.handleServerMethodException(DeviceManagementGrpc.getRemoveDeviceGroupElementsMethod(), e, responseObserver); } finally { GrpcUtils.handleServerMethodExit(DeviceManagementGrpc.getRemoveDeviceGroupElementsMethod()); } }
List<IDeviceGroupElementCreateRequest> elements = (List<IDeviceGroupElementCreateRequest>) (List<? extends IDeviceGroupElementCreateRequest>) request; List<IDeviceGroupElement> results = SiteWhere.getServer().getDeviceManagement(getTenant(servletRequest)) .removeDeviceGroupElements(groupToken, elements); List<IDeviceGroupElement> converted = new ArrayList<IDeviceGroupElement>(); for (IDeviceGroupElement elm : results) {