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
/**
* 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);
/**
* Execute the HTTP DELETE to the given URI template