From 50dc53e06a808ba6d026d93f60512da38de48aa6 Mon Sep 17 00:00:00 2001 From: Jakub Toth Date: Fri, 11 Mar 2016 10:59:06 +0100 Subject: [PATCH] Bug 5526 - Implementation of SchemaContextHandler Change-Id: I8575639228e498a16b350a4134b9928089091b4f Signed-off-by: Jakub Toth --- .../context/SchemaContextHandlerImpl.java | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/impl/schema/context/SchemaContextHandlerImpl.java diff --git a/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/impl/schema/context/SchemaContextHandlerImpl.java b/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/impl/schema/context/SchemaContextHandlerImpl.java new file mode 100644 index 0000000000..b2ac93eae0 --- /dev/null +++ b/restconf/sal-rest-connector/src/main/java/org/opendaylight/restconf/rest/impl/schema/context/SchemaContextHandlerImpl.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2016 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.restconf.rest.impl.schema.context; + +import org.opendaylight.restconf.rest.api.schema.context.SchemaContextHandler; +import org.opendaylight.yangtools.yang.model.api.SchemaContext; + +/** + * Implementation of {@link SchemaContextHandler} + * + */ +public class SchemaContextHandlerImpl implements SchemaContextHandler { + + private SchemaContext context; + + @Override + public void onGlobalContextUpdated(final SchemaContext context) { + this.context = null; + this.context = context; + } + + @Override + public SchemaContext getSchemaContext() { + return this.context; + } +} -- 2.36.6