X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frest%2Fapi%2FRestconfServiceLegacy.java;h=7d6cbfe919192bd91a14069ddb592db1e09dfbc2;hp=6683fd1835942f2af4bd23d42dc16220f3bb6872;hb=b825b2a5b92734113eae6c9c1176ec160ec8776b;hpb=13efd0b8e167e8aadd531b5ec0e72572a72bc249 diff --git a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfServiceLegacy.java b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfServiceLegacy.java index 6683fd1835..7d6cbfe919 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfServiceLegacy.java +++ b/opendaylight/md-sal/sal-rest-connector/src/main/java/org/opendaylight/controller/sal/rest/api/RestconfServiceLegacy.java @@ -1,17 +1,23 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.sal.rest.api; -import static org.opendaylight.controller.sal.restconf.impl.MediaTypes.API; - +import javax.ws.rs.Consumes; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; +import javax.ws.rs.core.Response; -import org.opendaylight.controller.md.sal.common.api.TransactionStatus; import org.opendaylight.controller.sal.restconf.impl.StructuredData; -import org.opendaylight.yangtools.yang.common.RpcResult; import org.opendaylight.yangtools.yang.data.api.CompositeNode; public interface RestconfServiceLegacy { @@ -22,25 +28,28 @@ public interface RestconfServiceLegacy { @Deprecated @GET @Path("/datastore") - @Produces({API+JSON,API+XML}) + @Produces({Draft01.MediaTypes.DATASTORE+JSON,Draft01.MediaTypes.DATASTORE+XML}) public StructuredData readAllData(); @Deprecated @GET @Path("/datastore/{identifier:.+}") - @Produces({API+JSON,API+XML}) + @Produces({Draft01.MediaTypes.DATA+JSON,Draft01.MediaTypes.DATA+XML, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) public StructuredData readData(@PathParam("identifier") String identifier); @Deprecated - @PUT + @POST @Path("/datastore/{identifier:.+}") - @Produces({API+JSON,API+XML}) - public RpcResult createConfigurationDataLegacy(@PathParam("identifier") String identifier, CompositeNode payload); + @Consumes({Draft01.MediaTypes.DATA+JSON,Draft01.MediaTypes.DATA+XML, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) + public Response createConfigurationDataLegacy(@PathParam("identifier") String identifier, CompositeNode payload); @Deprecated - @POST + @PUT @Path("/datastore/{identifier:.+}") - @Produces({API+JSON,API+XML}) - public RpcResult updateConfigurationDataLegacy(@PathParam("identifier") String identifier, CompositeNode payload); + @Consumes({Draft01.MediaTypes.DATA+JSON,Draft01.MediaTypes.DATA+XML, + MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_XML}) + public Response updateConfigurationDataLegacy(@PathParam("identifier") String identifier, CompositeNode payload); }