From 77fa76b4b15ec6d74920349f9a066ec4597b2585 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Tue, 16 Aug 2016 11:04:00 +0200 Subject: HONEYCOMB-22: Remove karaf based distribution and wiring Change-Id: I48aafb726de53b6ad3fb9b97c202f712dfa4a540 Signed-off-by: Maros Marsalek --- .../impl/rev160411/InMemoryDataTreeModule.java | 79 ---------------------- 1 file changed, 79 deletions(-) delete mode 100644 infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java (limited to 'infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java') diff --git a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java b/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java deleted file mode 100644 index 99e5b396c..000000000 --- a/infra/data-impl/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/data/impl/rev160411/InMemoryDataTreeModule.java +++ /dev/null @@ -1,79 +0,0 @@ -package org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411; - -import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.api.rev160411.DatatreeType; -import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -import org.opendaylight.yangtools.yang.data.api.schema.tree.*; -import org.opendaylight.yangtools.yang.data.impl.schema.tree.InMemoryDataTreeFactory; -import org.opendaylight.yangtools.yang.model.api.SchemaContext; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class InMemoryDataTreeModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.data.impl.rev160411.AbstractInMemoryDataTreeModule { - - private static final Logger LOG = LoggerFactory.getLogger(InMemoryDataTreeModule.class); - - public InMemoryDataTreeModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) { - super(identifier, dependencyResolver); - } - - public InMemoryDataTreeModule(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.InMemoryDataTreeModule 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() { - LOG.debug("InMemoryConfigDataTreeModule.createInstance()"); - return new CloseableConfigDataTree(getSchemaServiceDependency().getGlobalContext(), getType()); - } - - private static class CloseableConfigDataTree implements AutoCloseable, DataTree { - private final DataTree dataTree; - - CloseableConfigDataTree(final SchemaContext schemaContext, final DatatreeType type) { - this.dataTree = InMemoryDataTreeFactory.getInstance().create( - type == DatatreeType.Config ? TreeType.CONFIGURATION : TreeType.OPERATIONAL - ); - dataTree.setSchemaContext(schemaContext); - } - - @Override - public void close() throws Exception { - // NOP - } - - @Override - public DataTreeSnapshot takeSnapshot() { - return dataTree.takeSnapshot(); - } - - @Override - public void setSchemaContext(final SchemaContext newSchemaContext) { - dataTree.setSchemaContext(newSchemaContext); - } - - @Override - public void commit(final DataTreeCandidate candidate) { - dataTree.commit(candidate); - } - - @Override - public YangInstanceIdentifier getRootPath() { - return dataTree.getRootPath(); - } - - @Override - public void validate(final DataTreeModification modification) throws DataValidationFailedException { - dataTree.validate(modification); - } - - @Override - public DataTreeCandidate prepare(final DataTreeModification modification) { - return dataTree.prepare(modification); - } - } -} -- cgit 1.2.3-korg