Add support for RFC8072 media types
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / services / simple / api / RestconfService.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.restconf.nb.rfc8040.services.simple.api;
9
10 import javax.ws.rs.GET;
11 import javax.ws.rs.Path;
12 import javax.ws.rs.Produces;
13 import javax.ws.rs.core.MediaType;
14 import org.opendaylight.restconf.common.context.NormalizedNodeContext;
15 import org.opendaylight.restconf.nb.rfc8040.Rfc8040;
16 import org.opendaylight.restconf.nb.rfc8040.utils.RestconfConstants;
17
18 /**
19  * Service for getting yang library version.
20  */
21 public interface RestconfService extends UpdateHandlers {
22     /**
23      * Get yang library version.
24      *
25      * @return {@link NormalizedNodeContext}
26      */
27     @GET
28     @Path("/yang-library-version")
29     @Produces({
30         Rfc8040.MediaTypes.DATA + RestconfConstants.JSON,
31         Rfc8040.MediaTypes.DATA + RestconfConstants.XML,
32         Rfc8040.MediaTypes.DATA,
33         MediaType.APPLICATION_JSON,
34         MediaType.APPLICATION_XML,
35         MediaType.TEXT_XML
36     })
37     NormalizedNodeContext getLibraryVersion();
38 }