@@ -1104,17 +1104,16 @@ public JsonObject listAllAsJson() {
11041104 }
11051105
11061106 /**
1107- * Updates all settings by replacing them with the settings provided in the given JSON object.
1108- * This method validates the keys and values from the JSON object, converts them into
1109- * a list of Setting objects, and performs an atomic update of the internal settings.
1107+ * Updates all current settings from the specified JSON object. Validates the input JSON,
1108+ * converts it to a set of settings, and replaces all existing settings with the new ones
1109+ * in an atomic operation. If the settings object is null, contains invalid keys, or if the new
1110+ * set of settings is empty, the method throws an appropriate exception.
11101111 *
1111- * @param settings a JsonObject containing the new settings to apply.
1112- * Each key corresponds to a setting name, and each value corresponds
1113- * to its respective value. The keys and values will be validated before
1114- * applying the updates.
1115- * @throws IllegalArgumentException if the JSON object contains invalid keys or invalid settings.
1112+ * @param settings the JSON object containing the new configuration settings to be applied; must not be null
1113+ * @return a JsonObjectBuilder representing the operational details of the applied updates
1114+ * @throws IllegalArgumentException if the settings object is null, contains invalid keys, or results in empty settings
11161115 */
1117- public void setAllFromJson (JsonObject settings ) {
1116+ public JsonObjectBuilder setAllFromJson (JsonObject settings ) {
11181117 if (settings == null ) {
11191118 throw new IllegalArgumentException ("Settings cannot be null" );
11201119 }
@@ -1128,8 +1127,10 @@ public void setAllFromJson(JsonObject settings) {
11281127 // Convert JSON to Setting objects
11291128 Set <Setting > newSettings = convertJsonToSettings (settings );
11301129
1131- // Perform atomic update (replace all settings)
1132- replaceAllSettings (newSettings );
1130+ // Execute the update (in one atomic operation using a transaction)
1131+ Map <Setting , Op > operationalDetails = replaceAllSettings (newSettings );
1132+
1133+ return Op .convertToJson (operationalDetails );
11331134 }
11341135
11351136 /**
0 commit comments