From f116747b7c6dd7cba1e64469ff789e3b11d77aec Mon Sep 17 00:00:00 2001
From: Jan Zickermann <jan.zickermann@dataport.de>
Date: Mon, 21 Oct 2024 15:46:32 +0200
Subject: [PATCH] OZG-6891 KOP-2735 javadoc: Explain xta client config

---
 .../xta/client/config/XtaClientConfig.java    | 79 ++++++++++++++++++-
 1 file changed, 78 insertions(+), 1 deletion(-)

diff --git a/src/main/java/de/ozgcloud/xta/client/config/XtaClientConfig.java b/src/main/java/de/ozgcloud/xta/client/config/XtaClientConfig.java
index 8a655c7..5d07f40 100644
--- a/src/main/java/de/ozgcloud/xta/client/config/XtaClientConfig.java
+++ b/src/main/java/de/ozgcloud/xta/client/config/XtaClientConfig.java
@@ -26,50 +26,127 @@ import lombok.ToString;
 @ToString
 public class XtaClientConfig {
 
+	/**
+	 * The reader client identifiers which are used to fetch messages.
+	 *
+	 * <p>
+	 * Usually, in order to use the client identifiers, an according client certificate needs to be configured.
+	 * </p>
+	 */
 	@Builder.Default
 	private final List<@Valid XtaIdentifier> clientIdentifiers = emptyList();
 
 	/**
-	 * avoid downloading unsupported messages
+	 * This predicate may be used to filter listed messages before they are fetched. If null, all messages are fetched.
+	 *
+	 * <p>
+	 * Note that, usually, all messages for a client identifier should be read, i.e., fetched and processed. However, it may be useful to filter
+	 * messages before fetching them. For instance, to avoid downloading messages which would inevitably lead to a runtime exception during
+	 * processing.
+	 * </p>
 	 */
 	@Builder.Default
 	private final Predicate<XtaMessageMetaData> isMessageSupported = null;
 
+	/**
+	 * The URL of the management service.
+	 *
+	 * For instance: {@code https://my-xta-server.de/MB_XTA-WS/XTA210managementPort.svc}
+	 */
 	@NotBlank
 	private final String managementServiceUrl;
+	/**
+	 * The URL of the send service.
+	 *
+	 * For instance: {@code https://my-xta-server.de/MB_XTA-WS/XTA210sendPort.svc}
+	 */
 	@NotBlank
 	private final String sendServiceUrl;
+	/**
+	 * The URL of the message box service.
+	 *
+	 * For instance: {@code https://my-xta-server.de/MB_XTA-WS/XTA210msgBoxPort.svc}
+	 */
 	@NotBlank
 	private final String msgBoxServiceUrl;
 
+	/**
+	 * The number of message metadata items to request at a time. The default value is 50.
+	 *
+	 * <p>
+	 * Note that reducing this limit may result in more listing calls. Furthermore, listing all messages may not be possible if the number of
+	 * unprocessed messages reaches this limit, see {@linkplain de.ozgcloud.xta.client.XtaClient#fetchMessages fetchMessages}.
+	 * </p>
+	 */
 	@Positive
 	@Builder.Default
 	private final int maxListItems = 50;
 
+	/**
+	 * The keystore used to authenticate this client to the server.
+	 *
+	 * <p>
+	 *     The keystore should contain a private key and a certificate chain which the server trusts.
+	 * </p>
+	 */
 	@Valid
 	@Builder.Default
 	private final KeyStore clientCertKeystore = null;
 
+	/**
+	 * The truststore to authenticate the server to the client.
+	 *
+	 * <p>
+	 * The truststore should contain a root certificate or a certificate chain of the server. May be null if the server certificate is trusted by the JVM.
+	 * </p>
+	 */
 	@Valid
 	@Builder.Default
 	private final KeyStore trustStore = null;
 
+	/**
+	 * Whether to validate the XTA SOAP schema of the messages. Default is true.
+	 *
+	 * <p>
+	 *     This option is intended for testing purposes and turing it off is not recommended.
+	 * </p>
+	 */
 	@Builder.Default
 	private final boolean schemaValidation = true;
+
+	/**
+	 * Whether to log SOAP requests. Default is false.
+	 */
 	@Builder.Default
 	private final boolean logSoapRequests = false;
+
+	/**
+	 * Whether to log SOAP responses. Default is false.
+	 */
 	@Builder.Default
 	private final boolean logSoapResponses = false;
 
+	/**
+	 * Configuration for a keystore. Either for a client certificate or a trust store.
+	 */
 	@RequiredArgsConstructor
 	@Getter
 	@Builder
 	@ToString
 	public static class KeyStore {
+		/**
+		 * File content of the keystore file.
+		 */
 		@NotNull
 		private final byte[] content;
+		/**
+		 * The type of the keystore. For instance, "PKCS12" or "JKS".
+		 */
 		@NotBlank
 		private final String type;
+		/**
+		 * The password of the keystore.
+		 */
 		@NotNull
 		private final char[] password;
 	}
-- 
GitLab