Class RestClientLoader<T>
- java.lang.Object
-
- net.n2oapp.platform.loader.client.RestClientLoader<T>
-
- Type Parameters:
T- Тип данных
- All Implemented Interfaces:
ClientLoader
- Direct Known Subclasses:
JsonClientLoader
public abstract class RestClientLoader<T> extends Object implements ClientLoader
Загрузчик данных через REST API
-
-
Constructor Summary
Constructors Constructor Description RestClientLoader(org.springframework.web.client.RestOperations restTemplate)RestClientLoader(org.springframework.web.client.RestOperations restTemplate, String endpointPattern)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TgetData(org.springframework.core.io.Resource file)protected org.springframework.util.MultiValueMap<String,String>getHeaders()org.springframework.web.client.RestOperationsgetRestTemplate()protected StringgetUrl(URI server, String subject, String target)voidload(URI server, String subject, String target, org.springframework.core.io.Resource file)Загрузить данныеvoidsetEndpointPattern(String endpointPattern)
-
-
-
Constructor Detail
-
RestClientLoader
public RestClientLoader(org.springframework.web.client.RestOperations restTemplate)
-
RestClientLoader
public RestClientLoader(org.springframework.web.client.RestOperations restTemplate, String endpointPattern)
-
-
Method Detail
-
load
public void load(URI server, String subject, String target, org.springframework.core.io.Resource file)
Description copied from interface:ClientLoaderЗагрузить данные- Specified by:
loadin interfaceClientLoader- Parameters:
server- Адрес api сервераsubject- Владелец данныхtarget- Цельfile- Файл ресурса с данными
-
getData
protected abstract T getData(org.springframework.core.io.Resource file)
-
getRestTemplate
public org.springframework.web.client.RestOperations getRestTemplate()
-
setEndpointPattern
public void setEndpointPattern(String endpointPattern)
-
-