2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.restconf.rest.impl.services;
10 import javax.ws.rs.core.UriInfo;
11 import org.opendaylight.netconf.md.sal.rest.schema.SchemaExportContext;
12 import org.opendaylight.netconf.sal.restconf.impl.NormalizedNodeContext;
13 import org.opendaylight.restconf.rest.api.schema.context.SchemaContextHandler;
14 import org.opendaylight.restconf.rest.api.services.Draft11ServicesWrapper;
15 import org.opendaylight.restconf.rest.api.services.RestconfModulesService;
16 import org.opendaylight.restconf.rest.api.services.RestconfOperationsService;
17 import org.opendaylight.restconf.rest.api.services.RestconfStreamsService;
18 import org.opendaylight.restconf.rest.api.services.schema.RestconfSchemaService;
19 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
22 * Implementation of {@link Draft11ServicesWrapper}
25 public class Draft11ServicesWrapperImpl implements Draft11ServicesWrapper {
27 private final RestconfModulesService delegRestModSer;
28 private final RestconfOperationsService delegRestOpsSer;
29 private final RestconfStreamsService delegRestStrsSer;
30 private final RestconfSchemaService delegRestSchSer;
33 * Creating delegates to all implemented services
35 * @param schemaContextHandler
36 * - for handling {@link SchemaContext}
38 public Draft11ServicesWrapperImpl(final SchemaContextHandler schemaContextHandler) {
39 this.delegRestModSer = new RestconfModulesServiceImpl(schemaContextHandler);
40 this.delegRestOpsSer = new RestconfOperationsServiceImpl(schemaContextHandler);
41 this.delegRestStrsSer = new RestconfStreamsServiceImpl(schemaContextHandler);
42 this.delegRestSchSer = new RestconfSchemaServiceImpl(schemaContextHandler);
46 public NormalizedNodeContext getModules(final UriInfo uriInfo) {
47 return this.delegRestModSer.getModules(uriInfo);
51 public NormalizedNodeContext getModules(final String identifier, final UriInfo uriInfo) {
52 return this.delegRestModSer.getModules(identifier, uriInfo);
56 public NormalizedNodeContext getModule(final String identifier, final UriInfo uriInfo) {
57 return this.delegRestModSer.getModules(identifier, uriInfo);
61 public NormalizedNodeContext getOperations(final UriInfo uriInfo) {
62 return this.delegRestOpsSer.getOperations(uriInfo);
66 public NormalizedNodeContext getOperations(final String identifier, final UriInfo uriInfo) {
67 return this.delegRestOpsSer.getOperations(identifier, uriInfo);
71 public NormalizedNodeContext getAvailableStreams(final UriInfo uriInfo) {
72 return this.delegRestStrsSer.getAvailableStreams(uriInfo);
76 public SchemaExportContext getSchema(final String mountAndModuleId) {
77 return this.delegRestSchSer.getSchema(mountAndModuleId);