From c22723292891701ff303575fcaadac3e32decbfc Mon Sep 17 00:00:00 2001 From: Don Cottingham Date: Tue, 28 May 2024 14:27:21 -0700 Subject: [PATCH] update README and other documentation changes (#76) --- README.md | 2 +- codegeneration/codegen.sh | 1 + .../target/edge/client/ondevice/DefaultRuleLoader.java | 8 ++------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index cff36897..426a21dc 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ or `maven` as: ## Super Simple to Use -Please take a look at our [documentation](https://adobetarget-sdks.gitbook.io/docs/sdk-reference-guides/java-sdk) to learn how to use the Java SDK. +Please take a look at our [documentation](https://experienceleague.adobe.com/en/docs/target-dev/developer/server-side/java/overview) to learn how to use the Java SDK. ## Samples diff --git a/codegeneration/codegen.sh b/codegeneration/codegen.sh index a857bb24..22a61ccf 100755 --- a/codegeneration/codegen.sh +++ b/codegeneration/codegen.sh @@ -1,5 +1,6 @@ #!/bin/bash +# Using custom openapi-generator fork based on version 5.2.0 due to the main version introducing breaking changes to our models rm -rf ./build ../src/main/java/com/adobe/target/delivery/v1 mkdir ../src/main/java/com/adobe/target/delivery/v1 git clone git@github.com:dcottingham/openapi-generator.git diff --git a/src/main/java/com/adobe/target/edge/client/ondevice/DefaultRuleLoader.java b/src/main/java/com/adobe/target/edge/client/ondevice/DefaultRuleLoader.java index 1207f63e..6ca0a3e5 100644 --- a/src/main/java/com/adobe/target/edge/client/ondevice/DefaultRuleLoader.java +++ b/src/main/java/com/adobe/target/edge/client/ondevice/DefaultRuleLoader.java @@ -164,7 +164,8 @@ public void run() { long retryDelay = DefaultRuleLoader.this.retries * 1000; message = String.format( - "Download of local-decisioning rules failed, retrying in %s ms", retryDelay); + "Download of local-decisioning rules failed, retrying in %s ms", + retryDelay); logger.debug(message); scheduleTimer(retryDelay); } else { @@ -204,7 +205,6 @@ public String getLocation() { return this.getLocalDecisioningUrl(this.clientConfig); } - // For unit test mocking protected GetRequest generateRequest(ClientConfig clientConfig) { GetRequest getRequest = unirestInstance.get(getLocalDecisioningUrl(clientConfig)); if (this.lastETag != null) { @@ -213,22 +213,18 @@ protected GetRequest generateRequest(ClientConfig clientConfig) { return getRequest; } - // For unit test mocking protected HttpResponse executeRequest(GetRequest getRequest) { return getRequest.asObject(new GenericType() {}); } - // For unit test mocking protected void setLatestRules(OnDeviceDecisioningRuleSet ruleSet) { this.latestRules = ruleSet; } - // For unit test mocking protected void setLatestETag(String etag) { this.lastETag = etag; } - // For unit test mocking protected boolean loadRules(ClientConfig clientConfig) { try { TargetExceptionHandler handler = clientConfig.getExceptionHandler();