Move services API
[netconf.git] / restconf / restconf-nb-rfc8040 / src / main / java / org / opendaylight / restconf / nb / rfc8040 / rests / services / api / RestconfOperationsService.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.rests.services.api;
9
10 import javax.ws.rs.GET;
11 import javax.ws.rs.Path;
12 import javax.ws.rs.PathParam;
13 import javax.ws.rs.Produces;
14 import javax.ws.rs.core.Context;
15 import javax.ws.rs.core.MediaType;
16 import javax.ws.rs.core.UriInfo;
17 import org.opendaylight.restconf.common.context.NormalizedNodeContext;
18 import org.opendaylight.restconf.nb.rfc8040.Rfc8040;
19 import org.opendaylight.restconf.nb.rfc8040.utils.RestconfConstants;
20
21 /**
22  * Container that provides access to the data-model specific operations supported by the server.
23  */
24 public interface RestconfOperationsService {
25     /**
26      * List of rpc or action operations supported by the server.
27      *
28      * @param uriInfo URI information
29      * @return {@link NormalizedNodeContext}
30      */
31     @GET
32     @Path("/operations")
33     @Produces({
34         Rfc8040.MediaTypes.DATA + RestconfConstants.JSON,
35         Rfc8040.MediaTypes.DATA,
36         MediaType.APPLICATION_JSON,
37         MediaType.APPLICATION_XML,
38         MediaType.TEXT_XML
39     })
40     NormalizedNodeContext getOperations(@Context UriInfo uriInfo);
41
42     /**
43      * Valid for mount points. List of operations supported by the server.
44      *
45      * @param identifier path parameter
46      * @param uriInfo URI information
47      * @return {@link NormalizedNodeContext}
48      */
49     @GET
50     @Path("/operations/{identifier:.+}")
51     @Produces({
52         Rfc8040.MediaTypes.DATA + RestconfConstants.JSON,
53         Rfc8040.MediaTypes.DATA,
54         MediaType.APPLICATION_JSON,
55         MediaType.APPLICATION_XML,
56         MediaType.TEXT_XML
57     })
58     NormalizedNodeContext getOperations(@PathParam("identifier") String identifier, @Context UriInfo uriInfo);
59 }