Changing the license and trademark
[aai/sparky-be.git] / src / main / java / org / openecomp / sparky / dal / rest / RestDataProvider.java
1 /**
2  * ============LICENSE_START=======================================================
3  * org.onap.aai
4  * ================================================================================
5  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * Copyright © 2017 Amdocs
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *       http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  *
21  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
22  */
23 package org.openecomp.sparky.dal.rest;
24
25 /**
26  * The Interface RestDataProvider.
27  */
28 public interface RestDataProvider {
29
30   /**
31    * Do get.
32    *
33    * @param url the url
34    * @param acceptContentType the accept content type
35    * @return the operation result
36    */
37   OperationResult doGet(String url, String acceptContentType);
38
39   /**
40    * Do delete.
41    *
42    * @param url the url
43    * @param acceptContentType the accept content type
44    * @return the operation result
45    */
46   OperationResult doDelete(String url, String acceptContentType);
47
48   /**
49    * Do post.
50    *
51    * @param url the url
52    * @param jsonPayload the json payload
53    * @param acceptContentType the accept content type
54    * @return the operation result
55    */
56   OperationResult doPost(String url, String jsonPayload, String acceptContentType);
57
58   /**
59    * Do put.
60    *
61    * @param url the url
62    * @param jsonPayload the json payload
63    * @param acceptContentType the accept content type
64    * @return the operation result
65    */
66   OperationResult doPut(String url, String jsonPayload, String acceptContentType);
67
68   /**
69    * Do patch.
70    *
71    * @param url the url
72    * @param jsonPayload the json payload
73    * @param acceptContentType the accept content type
74    * @return the operation result
75    */
76   OperationResult doPatch(String url, String jsonPayload, String acceptContentType);
77
78   /**
79    * Do head.
80    *
81    * @param url the url
82    * @param acceptContentType the accept content type
83    * @return the operation result
84    */
85   OperationResult doHead(String url, String acceptContentType);
86
87   /**
88    * Do restful operation.
89    *
90    * @param method the method
91    * @param url the url
92    * @param payload the payload
93    * @param payloadType the payload type
94    * @param acceptContentType the accept content type
95    * @return the operation result
96    */
97   OperationResult doRestfulOperation(HttpMethod method, String url, String payload,
98       String payloadType, String acceptContentType);
99
100   /**
101    * Shutdown.
102    */
103   void shutdown();
104
105   /**
106    * Clear cache.
107    */
108   void clearCache();
109 }