Skip to content

Commit 0d17880

Browse files
committed
improve visibility of configuration
1 parent baf86fe commit 0d17880

File tree

5 files changed

+50
-44
lines changed

5 files changed

+50
-44
lines changed

spring-boot-starter-camunda/src/main/java/io/camunda/zeebe/spring/client/configuration/ZeebeClientConfiguration.java

+4
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,8 @@ public boolean useDefaultRetryPolicy() {
200200
return properties.useDefaultRetryPolicy();
201201
}
202202

203+
@Override
204+
public String toString() {
205+
return "ZeebeClientConfiguration{" + "properties=" + properties + ", commonConfigurationProperties=" + commonConfigurationProperties + ", authentication=" + authentication + ", jsonMapper=" + jsonMapper + ", interceptors=" + interceptors + ", zeebeClientExecutorService=" + zeebeClientExecutorService + '}';
206+
}
203207
}

spring-boot-starter-camunda/src/main/java/io/camunda/zeebe/spring/client/properties/CommonConfigurationProperties.java

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
@ConfigurationProperties(prefix = "common")
1212
public class CommonConfigurationProperties extends Client {
1313

14+
@Override
15+
public String toString() {
16+
return "CommonConfigurationProperties{" + "keycloak=" + keycloak + "} " + super.toString();
17+
}
18+
1419
private static final Logger LOGGER = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
1520

1621
@NestedConfigurationProperty

spring-boot-starter-camunda/src/main/java/io/camunda/zeebe/spring/client/properties/ZeebeClientConfigurationProperties.java

+31-44
Original file line numberDiff line numberDiff line change
@@ -222,20 +222,16 @@ public int hashCode() {
222222

223223
@Override
224224
public String toString() {
225-
return "ZeebeClientConfigurationProperties{" +
226-
"broker=" + broker +
227-
", cloud=" + cloud +
228-
", worker=" + worker +
229-
", message=" + message +
230-
", security=" + security +
231-
", job=" + job +
232-
", requestTimeout=" + requestTimeout +
233-
", ownsJobWorkerExecutor=" + ownsJobWorkerExecutor +
234-
'}';
225+
return "ZeebeClientConfigurationProperties{" + "environment=" + environment + ", connectionMode='" + connectionMode + '\'' + ", defaultTenantId='" + defaultTenantId + '\'' + ", defaultJobWorkerTenantIds=" + defaultJobWorkerTenantIds + ", applyEnvironmentVariableOverrides=" + applyEnvironmentVariableOverrides + ", enabled=" + enabled + ", broker=" + broker + ", cloud=" + cloud + ", worker=" + worker + ", message=" + message + ", security=" + security + ", job=" + job + ", ownsJobWorkerExecutor=" + ownsJobWorkerExecutor + ", defaultJobWorkerStreamEnabled=" + defaultJobWorkerStreamEnabled + ", requestTimeout=" + requestTimeout + '}';
235226
}
236227

237228
public static class Broker {
238229

230+
@Override
231+
public String toString() {
232+
return "Broker{" + "gatewayAddress='" + gatewayAddress + '\'' + ", keepAlive=" + keepAlive + '}';
233+
}
234+
239235
private String gatewayAddress;
240236
private Duration keepAlive = DEFAULT.getKeepAlive();
241237

@@ -293,16 +289,15 @@ public int hashCode() {
293289
return Objects.hash(gatewayAddress, keepAlive);
294290
}
295291

292+
}
293+
294+
public static class Cloud {
295+
296296
@Override
297297
public String toString() {
298-
return "Broker{" +
299-
"gatewayAddress='" + gatewayAddress + '\'' +
300-
", keepAlive=" + keepAlive +
301-
'}';
298+
return "Cloud{" + "clusterId='" + clusterId + '\'' + ", clientId='" + clientId + '\'' + ", clientSecret='" + clientSecret + '\'' + ", region='" + region + '\'' + ", scope='" + scope + '\'' + ", baseUrl='" + baseUrl + '\'' + ", authUrl='" + authUrl + '\'' + ", port=" + port + ", credentialsCachePath='" + credentialsCachePath + '\'' + '}';
302299
}
303-
}
304300

305-
public static class Cloud {
306301
private String clusterId;
307302
private String clientId;
308303
private String clientSecret;
@@ -399,6 +394,11 @@ public String getGatewayAddress() {
399394
}
400395

401396
public static class Worker {
397+
@Override
398+
public String toString() {
399+
return "Worker{" + "maxJobsActive=" + maxJobsActive + ", threads=" + threads + ", defaultName='" + defaultName + '\'' + ", defaultType='" + defaultType + '\'' + ", override=" + override + '}';
400+
}
401+
402402
private Integer maxJobsActive = DEFAULT.getDefaultJobWorkerMaxJobsActive();
403403
private Integer threads = DEFAULT.getNumJobWorkerExecutionThreads();
404404
private String defaultName = null; // setting NO default in Spring, as bean/method name is used as default
@@ -462,19 +462,15 @@ public int hashCode() {
462462
return Objects.hash(maxJobsActive, threads, defaultName, defaultType, override);
463463
}
464464

465+
}
466+
467+
public static class Job {
468+
465469
@Override
466470
public String toString() {
467-
return "Worker{" +
468-
"maxJobsActive=" + maxJobsActive +
469-
", threads=" + threads +
470-
", defaultName='" + defaultName + '\'' +
471-
", defaultType='" + defaultType + '\'' +
472-
", override=" + override +
473-
'}';
471+
return "Job{" + "timeout=" + timeout + ", pollInterval=" + pollInterval + '}';
474472
}
475-
}
476473

477-
public static class Job {
478474
private Duration timeout = DEFAULT.getDefaultJobTimeout();
479475
private Duration pollInterval = DEFAULT.getDefaultJobPollInterval();
480476

@@ -508,16 +504,15 @@ public int hashCode() {
508504
return Objects.hash(timeout, pollInterval);
509505
}
510506

507+
}
508+
509+
public static class Message {
510+
511511
@Override
512512
public String toString() {
513-
return "Job{" +
514-
"timeout=" + timeout +
515-
", pollInterval=" + pollInterval +
516-
'}';
513+
return "Message{" + "timeToLive=" + timeToLive + ", maxMessageSize=" + maxMessageSize + '}';
517514
}
518-
}
519515

520-
public static class Message {
521516
private Duration timeToLive = DEFAULT.getDefaultMessageTimeToLive();
522517
private int maxMessageSize = DEFAULT.getMaxMessageSize();
523518

@@ -550,15 +545,15 @@ public int hashCode() {
550545
return Objects.hash(timeToLive);
551546
}
552547

548+
}
549+
550+
public static class Security {
551+
553552
@Override
554553
public String toString() {
555-
return "Message{" +
556-
"timeToLive=" + timeToLive +
557-
'}';
554+
return "Security{" + "plaintext=" + plaintext + ", overrideAuthority='" + overrideAuthority + '\'' + ", certPath='" + certPath + '\'' + '}';
558555
}
559-
}
560556

561-
public static class Security {
562557
private boolean plaintext = DEFAULT.isPlaintextConnectionEnabled();
563558
private String overrideAuthority = DEFAULT.getOverrideAuthority();
564559
private String certPath = DEFAULT.getCaCertificatePath();
@@ -600,14 +595,6 @@ public int hashCode() {
600595
return Objects.hash(plaintext, overrideAuthority, certPath);
601596
}
602597

603-
@Override
604-
public String toString() {
605-
return "Security{" +
606-
"plaintext=" + plaintext +
607-
", overrideAuthority='" + overrideAuthority + '\'' +
608-
", certPath='" + certPath + '\'' +
609-
'}';
610-
}
611598
}
612599

613600
public String getGatewayAddress() {

spring-boot-starter-camunda/src/main/java/io/camunda/zeebe/spring/client/properties/common/Client.java

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
public class Client {
44

5+
@Override
6+
public String toString() {
7+
return "Client{" + "clientId='" + clientId + '\'' + ", clientSecret='" + clientSecret + '\'' + ", username='" + username + '\'' + ", password='" + password + '\'' + ", enabled=" + enabled + ", url='" + url + '\'' + ", authUrl='" + authUrl + '\'' + ", baseUrl='" + baseUrl + '\'' + '}';
8+
}
9+
510
private String clientId;
611
private String clientSecret;
712
private String username;

spring-boot-starter-camunda/src/main/java/io/camunda/zeebe/spring/client/properties/common/Keycloak.java

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
public class Keycloak {
44

5+
@Override
6+
public String toString() {
7+
return "Keycloak{" + "url='" + url + '\'' + ", realm='" + realm + '\'' + ", tokenUrl='" + tokenUrl + '\'' + '}';
8+
}
9+
510
private String url;
611
private String realm;
712
private String tokenUrl;

0 commit comments

Comments
 (0)