2 * ============LICENSE_START=======================================================
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
21 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
23 package org.openecomp.sparky.dal.rest;
26 * The Interface RestDataProvider.
28 public interface RestDataProvider {
34 * @param acceptContentType the accept content type
35 * @return the operation result
37 OperationResult doGet(String url, String acceptContentType);
43 * @param acceptContentType the accept content type
44 * @return the operation result
46 OperationResult doDelete(String url, String acceptContentType);
52 * @param jsonPayload the json payload
53 * @param acceptContentType the accept content type
54 * @return the operation result
56 OperationResult doPost(String url, String jsonPayload, String acceptContentType);
62 * @param jsonPayload the json payload
63 * @param acceptContentType the accept content type
64 * @return the operation result
66 OperationResult doPut(String url, String jsonPayload, String acceptContentType);
72 * @param jsonPayload the json payload
73 * @param acceptContentType the accept content type
74 * @return the operation result
76 OperationResult doPatch(String url, String jsonPayload, String acceptContentType);
82 * @param acceptContentType the accept content type
83 * @return the operation result
85 OperationResult doHead(String url, String acceptContentType);
88 * Do restful operation.
90 * @param method the method
92 * @param payload the payload
93 * @param payloadType the payload type
94 * @param acceptContentType the accept content type
95 * @return the operation result
97 OperationResult doRestfulOperation(HttpMethod method, String url, String payload,
98 String payloadType, String acceptContentType);