/** * Remove properties * @param search the search query * @param path the path * @param properties the properties to remove * @param response the http response */ private void removeProperties(String search, String path, String properties, HttpServerResponse response) { List<String> list = Arrays.asList(properties.split(",")); store.removeProperties(search, path, list, ar -> { if (ar.succeeded()) { response .setStatusCode(204) .end(); } else { fail(response, ar.cause()); } }); }
/** * Rx version of {@link #removeProperties(String, String, List, Handler)} * @param search the search query * @param path the path where to search for the values (may be null) * @param properties the list of properties to remove * @return a Completable that completes when the operation has finished */ public Completable rxRemoveProperties(String search, String path, List<String> properties) { return Single.create(new SingleOnSubscribeAdapter<Void>(f -> removeProperties(search, path, properties, f))).toCompletable(); }