From fa641a3e06a905cb3222ebd15a2b4ab90b599efc Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Fri, 13 Apr 2018 13:38:16 +0200 Subject: HONEYCOMB-431: delegate DataModification.validate to WriterRegistry This patch introduces ModifiableDataTreeDelegator.validateCandidate that translates DataTreeCandidate to DataObjectUpdates and delegates validation to WriterRegistry (similarly as for bulk update). ModifiableDataTreeManager.commit implementation invokes validation before bulk update. To make it efficient, DataObjectUpdates are computed once and stored in DataTreeContext. Change-Id: If4bd558e64ed84c11c9c50c7a98a2aaa8db841bb Signed-off-by: Marek Gradzki --- infra/data-api/src/main/java/io/fd/honeycomb/data/DataModification.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'infra/data-api') diff --git a/infra/data-api/src/main/java/io/fd/honeycomb/data/DataModification.java b/infra/data-api/src/main/java/io/fd/honeycomb/data/DataModification.java index a87983cdb..9fef3b48c 100644 --- a/infra/data-api/src/main/java/io/fd/honeycomb/data/DataModification.java +++ b/infra/data-api/src/main/java/io/fd/honeycomb/data/DataModification.java @@ -55,6 +55,8 @@ public interface DataModification extends ReadableDataManager, AutoCloseable { /** * Alters data tree using this modification. * + *

Modification is validated before application. + * * @throws TranslationException if commit failed while updating data tree state */ void commit() throws TranslationException; -- cgit 1.2.3-korg