8620516a907fc463639cf33eb0efa8a55eeb365d
[ovsdb.git] / northbound / src / main / java / org / opendaylight / ovsdb / northbound / TableResource.java
1 package org.opendaylight.ovsdb.northbound;
2
3 import javax.ws.rs.GET;
4 import javax.ws.rs.Path;
5 import javax.ws.rs.PathParam;
6 import javax.ws.rs.Produces;
7 import javax.ws.rs.core.MediaType;
8 import javax.ws.rs.core.Response;
9
10 /**
11  * Northbound interface for OVSDB tables
12  */
13 public class TableResource {
14
15     String databaseName;
16     String nodeId;
17
18     TableResource(String nodeId, String databaseName){
19         this.nodeId = nodeId;
20         this.databaseName = databaseName;
21     }
22
23     @GET
24     @Produces(MediaType.APPLICATION_JSON)
25     public Response getTables(){
26         return Response.noContent().build();
27     }
28
29     @GET
30     @Path("{name}")
31     @Produces(MediaType.APPLICATION_JSON)
32     public Response getTableDetails(@PathParam("name") String name){
33         return Response.noContent().build();
34     }
35
36     @Path("{name}/row")
37     public RowResource getDatabaseTables(@PathParam("name") String name){
38         return new RowResource(nodeId, databaseName, name);
39     }
40
41 }