Check for existing VNF in VNFM
[so.git] / common / src / main / java / org / onap / so / rest / service / HttpRestServiceProvider.java
index 43b2fb4..7fb5adc 100644 (file)
@@ -20,9 +20,8 @@
 
 package org.onap.so.rest.service;
 
-import org.springframework.http.ResponseEntity;
-
 import com.google.common.base.Optional;
+import org.springframework.http.ResponseEntity;
 
 /**
  * @author waqas.ikram@est.tech
@@ -31,42 +30,62 @@ public interface HttpRestServiceProvider {
 
     /**
      * Execute the HTTP GET to the given URI template
-     * 
+     *
      * @param url the URL
      * @param clazz the type of the return value
      * @return Returns the body of this entity.
      */
-    public <T> Optional<T> get(final String url, final Class<T> clazz);
+    <T> Optional<T> get(final String url, final Class<T> clazz);
 
     /**
      * Execute the HTTP GET to the given URI template
-     * 
+     *
      * @param url the URL
      * @param clazz the type of the return value
      * @return Returns the {@link ResponseEntity}.
      */
-    public <T> ResponseEntity<T> getHttpResponse(final String url, final Class<T> clazz);
+    <T> ResponseEntity<T> getHttpResponse(final String url, final Class<T> clazz);
 
 
     /**
      * Execute the HTTP POST to the given URI template
-     * 
+     *
      * @param object the entity (i.e. body) to write to the request
      * @param url the URL
      * @param clazz the type of the return value
      * @return Returns the body of this entity.
      */
-    public <T> Optional<T> post(final Object object, final String url, final Class<T> clazz);
+    <T> Optional<T> post(final Object object, final String url, final Class<T> clazz);
 
     /**
      * Execute the HTTP POST to the given URI template
-     * 
+     *
+     * @param object the entity (i.e. body) to write to the request
+     * @param url the URL
+     * @param clazz the type of the return value
+     * @return Returns the {@link ResponseEntity}.
+     */
+    <T> ResponseEntity<T> postHttpRequest(final Object object, final String url, final Class<T> clazz);
+
+    /**
+     * Execute the HTTP PUT to the given URI template
+     *
+     * @param object the entity (i.e. body) to write to the request
+     * @param url the URL
+     * @param clazz the type of the return value
+     * @return Returns the body of this entity.
+     */
+    <T> Optional<T> put(final Object object, final String url, final Class<T> clazz);
+
+    /**
+     * Execute the HTTP PUT to the given URI template
+     *
      * @param object the entity (i.e. body) to write to the request
      * @param url the URL
      * @param clazz the type of the return value
      * @return Returns the {@link ResponseEntity}.
      */
-    public <T> ResponseEntity<T> postHttpRequest(final Object object, final String url, final Class<T> clazz);
+    <T> ResponseEntity<T> putHttpRequest(final Object object, final String url, final Class<T> clazz);
 
 
 }