X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=sdnc-a1-controller%2Fnorthbound%2Fnonrt-ric-api%2Fprovider%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fsdnc%2Fnorthbound%2Frestadpter%2FRestAdapter.java;h=8f13f22d841cf35a7d9be05995db648da6a9c75f;hb=238fd97d5c8320cc8a53e04e04cfd39dcf900c4e;hp=98759fd50c893fc97a030bd16fc61c725acc268f;hpb=b6fe5a1bbad372357f6b441e1657dd8bbe48dc1a;p=nonrtric.git diff --git a/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/onap/sdnc/northbound/restadpter/RestAdapter.java b/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/onap/sdnc/northbound/restadpter/RestAdapter.java index 98759fd5..8f13f22d 100644 --- a/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/onap/sdnc/northbound/restadpter/RestAdapter.java +++ b/sdnc-a1-controller/northbound/nonrt-ric-api/provider/src/main/java/org/onap/sdnc/northbound/restadpter/RestAdapter.java @@ -20,12 +20,11 @@ package org.onap.sdnc.northbound.restadpter; -import com.google.common.base.Optional; - +import org.springframework.http.ResponseEntity; /** * An interface to wrap the generic HTTP methods - * + * * @author lathishbabu.ganesan@est.tech * */ @@ -34,29 +33,29 @@ public interface RestAdapter { /** * Retrieve a representation by doing a GET on the specified URL. The response (if any) is * converted and returned. - * + * * @param uri the URL * @param clazz responseType the type of the return value * @return the converted object */ - Optional get(final String url, final Class clazz); + ResponseEntity get(final String url, final Class clazz); /** * Create or update a resource by PUTting the given object to the URI. - * + * * @param url the URL - * @param request the Object to be PUT (may be {@code null}) + * @param request the String to be PUT (may be {@code null}) * @return the response code */ - Optional put(final String url, final Object object); + ResponseEntity put(final String url, final String body); /** * Delete resource for the given object to the URI. - * + * * @param url the URL * @return the response code */ - Optional delete(final String url); + ResponseEntity delete(final String url); }