]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.auditlogging/src/org/simantics/audit/client/AuditLoggingAPIClient.java
Remove fixed "testlog" as client id and read from system property
[simantics/platform.git] / bundles / org.simantics.auditlogging / src / org / simantics / audit / client / AuditLoggingAPIClient.java
index a7fc6022a921489f6bfabf4d67bcd1df8e750996..6f0ca1fd37ec89404d0912f7a78eabfef53a3270 100644 (file)
@@ -34,7 +34,7 @@ public class AuditLoggingAPIClient {
         ClientConfig configuration = new ClientConfig();
         configuration.register(JacksonFeature.class);
         httpClient = ClientBuilder.newClient(configuration);
-        if (!serverAddress.startsWith("http://")) {
+        if (!serverAddress.startsWith("http://") && !serverAddress.startsWith("https://")) {
             serverAddress = "http://" + serverAddress;
         }
         base = httpClient.target(serverAddress);
@@ -47,6 +47,10 @@ public class AuditLoggingAPIClient {
         }
     }
 
+    public String getUuid() {
+        return uuid;
+    }
+
     private void register(String id) throws AuditLoggingException {
         try {
             Response response = base.path("register").request(MediaType.APPLICATION_JSON_TYPE).post(Entity.json(Collections.singletonMap("id", id)));