diff options
author | 2016-04-10 23:45:43 +0200 | |
---|---|---|
committer | 2016-04-12 11:00:37 +0200 | |
commit | 8764f31fa74942d963dc85dd53227e980ceadf44 (patch) | |
tree | cf4a05617adbe8ef445e6220d40f4b65b6fa6eec /v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn | |
parent | c806dc87185ee3a994685561ea024cad45210036 (diff) |
HONEYCOMB-34: Configurable ConfigDataTree dependency
Change-Id: I17a93835541e66835398391e2a127b25767b774a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn')
2 files changed, 77 insertions, 0 deletions
diff --git a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModule.java b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModule.java new file mode 100644 index 000000000..88e87956b --- /dev/null +++ b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModule.java @@ -0,0 +1,64 @@ +package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411; + +import io.fd.honeycomb.v3po.data.DataTreeSnapshot; +import io.fd.honeycomb.v3po.data.ModifiableDataTree; +import io.fd.honeycomb.v3po.data.impl.ConfigDataTree; +import io.fd.honeycomb.v3po.translate.TranslationException; +import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTree; +import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeModification; +import org.opendaylight.yangtools.yang.data.api.schema.tree.DataValidationFailedException; +import org.opendaylight.yangtools.yang.data.api.schema.tree.TreeType; +import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory; + +public class ConfigDataTreeModule extends + org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractConfigDataTreeModule { + public ConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, + org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { + super(identifier, dependencyResolver); + } + + public ConfigDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, + org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, + org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.ConfigDataTreeModule oldModule, + java.lang.AutoCloseable oldInstance) { + super(identifier, dependencyResolver, oldModule, oldInstance); + } + + @Override + public void customValidation() { + // add custom validation form module attributes here. + } + + @Override + public java.lang.AutoCloseable createInstance() { + final DataTree dataTree = InMemoryDataTreeFactory.getInstance().create(TreeType.CONFIGURATION); + dataTree.setSchemaContext(getSchemaServiceDependency().getGlobalContext()); + return new CloseableConfigDataTree(new ConfigDataTree(getBindingNormalizedNodeSerializerDependency(), dataTree, + getWriterRegistryDependency())); + } + + private static final class CloseableConfigDataTree implements ModifiableDataTree, AutoCloseable { + + private final ConfigDataTree delegate; + + CloseableConfigDataTree(final ConfigDataTree delegate) { + this.delegate = delegate; + } + + @Override + public void close() throws Exception { + // NOP + } + + @Override + public void modify(final DataTreeModification modification) + throws DataValidationFailedException, TranslationException { + delegate.modify(modification); + } + + @Override + public DataTreeSnapshot takeSnapshot() { + return delegate.takeSnapshot(); + } + } +} diff --git a/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModuleFactory.java b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModuleFactory.java new file mode 100644 index 000000000..19baab13a --- /dev/null +++ b/v3po/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/ConfigDataTreeModuleFactory.java @@ -0,0 +1,13 @@ +/* +* Generated file +* +* Generated from: yang module name: data-impl yang module local name: config-data-tree +* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator +* Generated at: Sun Apr 10 22:07:29 CEST 2016 +* +* Do not modify this file unless it is present under src/main directory +*/ +package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411; +public class ConfigDataTreeModuleFactory extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractConfigDataTreeModuleFactory { + +} |