Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add Http Response Code in A1 Controller Api
[nonrtric.git]
/
sdnc-a1-controller
/
northbound
/
nonrt-ric-api
/
provider
/
src
/
main
/
java
/
org
/
onap
/
sdnc
/
northbound
/
restadpter
/
RestAdapter.java
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
98759fd
..
8f13f22
100644
(file)
--- 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;
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
/**
* An interface to wrap the generic HTTP methods
- *
+ *
* @author lathishbabu.ganesan@est.tech
*
*/
* @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.
/**
* 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
*/
* @param uri the URL
* @param clazz responseType the type of the return value
* @return the converted object
*/
- <T>
Optional
<T> get(final String url, final Class<?> clazz);
+ <T>
ResponseEntity
<T> get(final String url, final Class<?> clazz);
/**
* Create or update a resource by PUTting the given object to the URI.
/**
* Create or update a resource by PUTting the given object to the URI.
- *
+ *
* @param url the URL
* @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
*/
* @return the response code
*/
- <T>
Optional<T> put(final String url, final Object object
);
+ <T>
ResponseEntity<T> put(final String url, final String body
);
/**
* Delete resource for the given object to the URI.
/**
* Delete resource for the given object to the URI.
- *
+ *
* @param url the URL
* @return the response code
*/
* @param url the URL
* @return the response code
*/
- <T>
Optional
<T> delete(final String url);
+ <T>
ResponseEntity
<T> delete(final String url);
}
}