Merge from ECOMP's repository
[vid.git] / vid-app-common / src / main / java / org / onap / vid / mso / rest / RestInterface.java
1 package org.onap.vid.mso.rest;
2
3 import org.onap.vid.changeManagement.RequestDetailsWrapper;
4 import org.onap.vid.mso.RestObject;
5 import org.onap.vid.mso.RestObjectWithRequestInfo;
6
7 /**
8  * Created by pickjonathan on 26/06/2017.
9  */
10 public interface RestInterface {
11
12     /**
13      * Gets the.
14      *
15      * @param <T> the generic type
16      * @param t the t
17      * @param path the path
18      * @param restObject the rest object
19      * @param warpException
20      * @throws Exception the exception
21      */
22     <T> RestObjectWithRequestInfo<T> Get(T t, String path, RestObject<T> restObject, boolean warpException);
23
24     /**
25      * Delete.
26      *
27      * @param <T> the generic type
28      * @param t the t
29      * @param r the r
30      * @param path the path
31      * @param restObject the rest object
32      * @throws Exception the exception
33      */
34     <T> void Delete(T t, Object r, String path, RestObject<T> restObject);
35
36     /**
37      * Post.
38      *
39      * @param t the t
40      * @param r the r
41      * @param path the path
42      * @param restObject the rest object
43      * @throws Exception the exception
44      */
45     void Post(String t, Object r, String path, RestObject<String> restObject);
46
47     /**
48      * Put.
49      *
50      * @param <T> the generic type
51      * @param t the t
52      * @param r the r
53      * @param path the path
54      * @param restObject the rest object
55      * @throws Exception the exception
56      */
57     <T> void Put(T t, RequestDetailsWrapper r, String path, RestObject<T> restObject);
58
59     <T> RestObject<T> GetForObject(String path, Class<T> clazz);
60
61 }