fjtirado commented on code in PR #1894:
URL: 
https://github.com/apache/incubator-kie-kogito-apps/pull/1894#discussion_r1348677335


##########
data-index/data-index-common/src/main/java/org/kie/kogito/index/api/KogitoRuntimeCommonClient.java:
##########
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.kie.kogito.index.api;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.CompletableFuture;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import org.kie.kogito.index.model.Job;
+import org.kie.kogito.index.service.DataIndexServiceException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import io.quarkus.security.credential.TokenCredential;
+import io.quarkus.security.identity.SecurityIdentity;
+import io.vertx.core.AsyncResult;
+import io.vertx.core.Vertx;
+import io.vertx.core.buffer.Buffer;
+import io.vertx.core.json.JsonObject;
+import io.vertx.ext.web.client.HttpResponse;
+import io.vertx.ext.web.client.WebClient;
+import io.vertx.ext.web.client.WebClientOptions;
+
+import static java.lang.String.format;
+
+@ApplicationScoped
+public class KogitoRuntimeCommonClient {
+
+    public static final String CANCEL_JOB_PATH = "/jobs/%s";
+    public static final String RESCHEDULE_JOB_PATH = "/jobs/%s";
+
+    public static final String FROM_PROCESS_INSTANCE_WITH_ID = "from 
ProcessInstance with id: ";
+
+    private static final Logger LOGGER = 
LoggerFactory.getLogger(KogitoRuntimeCommonClient.class);
+
+    protected Vertx vertx;
+
+    protected SecurityIdentity identity;
+
+    protected Map<String, WebClient> serviceWebClientMap = new HashMap<>();
+
+    @ConfigProperty(name = "kogito.dataindex.gateway.url")
+    protected Optional<String> gatewayTargetUrl;
+
+    public void setGatewayTargetUrl(Optional<String> gatewayTargetUrl) {
+        this.gatewayTargetUrl = gatewayTargetUrl;

Review Comment:
   This one is only used for testing, isnt it?
   I thinik it can be removed and use quarkus test profile to set the property 
for the test. 
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to