Added SchemaContextHolder interface to RuntimeGeneratedMappingServiceImpl to provide... 53/5153/2
authorTony Tkacik <ttkacik@cisco.com>
Sat, 8 Feb 2014 04:11:07 +0000 (05:11 +0100)
committerTony Tkacik <ttkacik@cisco.com>
Sat, 8 Feb 2014 04:11:07 +0000 (05:11 +0100)
Change-Id: Iceb5af637ba36ec23c8874a830b7d804ea7f345d
Signed-off-by: Martin Bobak <mbobak@cisco.com>
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
code-generator/binding-generator-impl/src/main/java/org/opendaylight/yangtools/sal/binding/generator/impl/RuntimeGeneratedMappingServiceImpl.xtend
yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/SchemaContextHolder.java [new file with mode: 0644]

index edd487705f05ea029d5ab5e79d9535a0759fdd2d..780c8824d951aecd90732f6ba8076b5a1c465999 100644 (file)
@@ -61,8 +61,10 @@ import java.net.URI
 import org.opendaylight.yangtools.yang.model.api.Module
 import com.google.common.base.Optional
 import org.opendaylight.yangtools.yang.binding.BindingMapping
+import org.opendaylight.yangtools.yang.model.api.SchemaContextHolder
 
-class RuntimeGeneratedMappingServiceImpl implements BindingIndependentMappingService, SchemaServiceListener, SchemaLock, AutoCloseable {
+class RuntimeGeneratedMappingServiceImpl implements BindingIndependentMappingService, SchemaServiceListener,
+SchemaLock, AutoCloseable, SchemaContextHolder {
 
     @Property
     ClassPool pool;
@@ -91,6 +93,7 @@ class RuntimeGeneratedMappingServiceImpl implements BindingIndependentMappingSer
 
     val promisedTypes = HashMultimap.<Type, SettableFuture<Type>>create;
 
+    @Property
     var SchemaContext schemaContext;
 
     //ServiceRegistration<SchemaServiceListener> listenerRegistration
diff --git a/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/SchemaContextHolder.java b/yang/yang-model-api/src/main/java/org/opendaylight/yangtools/yang/model/api/SchemaContextHolder.java
new file mode 100644 (file)
index 0000000..2534768
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yangtools.yang.model.api;
+
+public interface SchemaContextHolder {
+    SchemaContext getSchemaContext();
+}