From 28208ac2b1b9e068c51eee79cf1bfedc6a818195 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Tue, 12 Apr 2016 10:13:37 +0200 Subject: HONEYCOMB-9: Migrate Interface listener Change-Id: Iffde1ee21b749a8c8efa96c243f7f8bb0811b4c7 Signed-off-by: Maros Marsalek --- .../v3po/translate/spi/write/RootWriterCustomizer.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'v3po/translate-spi') diff --git a/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/write/RootWriterCustomizer.java b/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/write/RootWriterCustomizer.java index ca4f02dce..2cdcff3fd 100644 --- a/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/write/RootWriterCustomizer.java +++ b/v3po/translate-spi/src/main/java/io/fd/honeycomb/v3po/translate/spi/write/RootWriterCustomizer.java @@ -18,6 +18,7 @@ package io.fd.honeycomb.v3po.translate.spi.write; import com.google.common.annotations.Beta; import io.fd.honeycomb.v3po.translate.Context; +import io.fd.honeycomb.v3po.translate.write.WriteFailedException; import javax.annotation.Nonnull; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -36,10 +37,12 @@ public interface RootWriterCustomizer { * @param id Identifier(from root) of data being written * @param dataAfter New data to be written * @param writeContext Write context can be used to store any useful information and then utilized by other customizers + * + * @throws WriteFailedException if write was unsuccessful */ void writeCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final D dataAfter, - @Nonnull final Context writeContext); + @Nonnull final Context writeContext) throws WriteFailedException; /** * Handle update operation. U from CRUD. @@ -48,11 +51,13 @@ public interface RootWriterCustomizer { * @param dataBefore Old data * @param dataAfter New, updated data * @param writeContext Write context can be used to store any useful information and then utilized by other customizers + * + * @throws WriteFailedException if update was unsuccessful */ void updateCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final D dataBefore, @Nonnull final D dataAfter, - @Nonnull final Context writeContext); + @Nonnull final Context writeContext) throws WriteFailedException; /** * Handle delete operation. D from CRUD. @@ -60,8 +65,10 @@ public interface RootWriterCustomizer { * @param id Identifier(from root) of data being written * @param dataBefore Old data being deleted * @param writeContext Write context can be used to store any useful information and then utilized by other customizers + * + * @throws WriteFailedException if delete was unsuccessful */ void deleteCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final D dataBefore, - @Nonnull final Context writeContext); + @Nonnull final Context writeContext) throws WriteFailedException; } -- cgit 1.2.3-korg