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