Class LiveImportClientImpl
- java.lang.Object
-
- org.dspace.importer.external.liveimportclient.service.LiveImportClientImpl
-
- All Implemented Interfaces:
LiveImportClient
public class LiveImportClientImpl extends Object implements LiveImportClient
Implementation ofLiveImportClient.- Author:
- Mykhaylo Boychuk (mykhaylo.boychuk at 4science dot com)
-
-
Field Summary
Fields Modifier and Type Field Description static StringHEADER_PARAMETERSstatic StringURI_PARAMETERS
-
Constructor Summary
Constructors Constructor Description LiveImportClientImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringexecuteHttpGetRequest(int timeout, String URL, Map<String,Map<String,String>> params)Http GET requestStringexecuteHttpPostRequest(String URL, Map<String,Map<String,String>> params, String entry)Http POST requestorg.apache.http.impl.client.CloseableHttpClientgetHttpClient()voidsetHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
-
-
-
Field Detail
-
URI_PARAMETERS
public static final String URI_PARAMETERS
- See Also:
- Constant Field Values
-
HEADER_PARAMETERS
public static final String HEADER_PARAMETERS
- See Also:
- Constant Field Values
-
-
Method Detail
-
executeHttpGetRequest
public String executeHttpGetRequest(int timeout, String URL, Map<String,Map<String,String>> params)
Description copied from interface:LiveImportClientHttp GET request- Specified by:
executeHttpGetRequestin interfaceLiveImportClient- Parameters:
timeout- The connect timeout in millisecondsURL- URLparams- This map contains the parameters to be included in the request. Each parameter will be added to the url?(key=value)- Returns:
- The response in String type converted from InputStream
-
executeHttpPostRequest
public String executeHttpPostRequest(String URL, Map<String,Map<String,String>> params, String entry)
Description copied from interface:LiveImportClientHttp POST request- Specified by:
executeHttpPostRequestin interfaceLiveImportClient- Parameters:
URL- URLparams- This map contains the header params to be included in the request.entry- the entity value- Returns:
- the response in String type converted from InputStream
-
getHttpClient
public org.apache.http.impl.client.CloseableHttpClient getHttpClient()
-
setHttpClient
public void setHttpClient(org.apache.http.impl.client.CloseableHttpClient httpClient)
-
-