1 package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411;
3 import io.fd.honeycomb.v3po.data.DataTreeSnapshot;
4 import io.fd.honeycomb.v3po.data.ModifiableDataTree;
5 import io.fd.honeycomb.v3po.data.impl.ConfigDataTree;
6 import io.fd.honeycomb.v3po.translate.TranslationException;
7 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree;
8 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification;
9 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException;
10 import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType;
11 import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory;
13 public class ConfigDataTreeModule extends
14 org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractConfigDataTreeModule {
15 public ConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
16 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
17 super(identifier, dependencyResolver);
20 public ConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier,
21 org.opendaylight.controller.config.api.DependencyResolver dependencyResolver,
22 org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.ConfigDataTreeModule oldModule,
23 java.lang.AutoCloseable oldInstance) {
24 super(identifier, dependencyResolver, oldModule, oldInstance);
28 public void customValidation() {
29 // add custom validation form module attributes here.
33 public java.lang.AutoCloseable createInstance() {
34 final DataTree dataTree = InMemoryDataTreeFactory.getInstance().create(TreeType.CONFIGURATION);
35 dataTree.setSchemaContext(getSchemaServiceDependency().getGlobalContext());
36 return new CloseableConfigDataTree(new ConfigDataTree(getBindingNormalizedNodeSerializerDependency(), dataTree,
37 getWriterRegistryDependency()));
40 private static final class CloseableConfigDataTree implements ModifiableDataTree, AutoCloseable {
42 private final ConfigDataTree delegate;
44 CloseableConfigDataTree(final ConfigDataTree delegate) {
45 this.delegate = delegate;
49 public void close() throws Exception {
54 public void modify(final DataTreeModification modification)
55 throws DataValidationFailedException, TranslationException {
56 delegate.modify(modification);
60 public DataTreeSnapshot takeSnapshot() {
61 return delegate.takeSnapshot();