2 * Copyright (c) 2014 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.controller.sal.rest.api;
10 import javax.ws.rs.Consumes;
11 import javax.ws.rs.GET;
12 import javax.ws.rs.POST;
13 import javax.ws.rs.PUT;
14 import javax.ws.rs.Path;
15 import javax.ws.rs.PathParam;
16 import javax.ws.rs.Produces;
17 import javax.ws.rs.core.MediaType;
18 import javax.ws.rs.core.Response;
20 import org.opendaylight.controller.sal.restconf.impl.StructuredData;
21 import org.opendaylight.yangtools.yang.data.api.CompositeNode;
23 public interface RestconfServiceLegacy {
25 public static final String XML = "+xml";
26 public static final String JSON = "+json";
31 @Produces({Draft01.MediaTypes.DATASTORE+JSON,Draft01.MediaTypes.DATASTORE+XML})
32 public StructuredData readAllData();
36 @Path("/datastore/{identifier:.+}")
37 @Produces({Draft01.MediaTypes.DATA+JSON,Draft01.MediaTypes.DATA+XML,
38 MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML})
39 public StructuredData readData(@PathParam("identifier") String identifier);
43 @Path("/datastore/{identifier:.+}")
44 @Consumes({Draft01.MediaTypes.DATA+JSON,Draft01.MediaTypes.DATA+XML,
45 MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML})
46 public Response createConfigurationDataLegacy(@PathParam("identifier") String identifier, CompositeNode payload);
50 @Path("/datastore/{identifier:.+}")
51 @Consumes({Draft01.MediaTypes.DATA+JSON,Draft01.MediaTypes.DATA+XML,
52 MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML})
53 public Response updateConfigurationDataLegacy(@PathParam("identifier") String identifier, CompositeNode payload);