Class CudamiBaseClient<T>
java.lang.Object
de.digitalcollections.cudami.client.CudamiBaseClient<T>
- Direct Known Subclasses:
CudamiArticlesClient,CudamiCollectionsClient,CudamiCorporateBodiesClient,CudamiDigitalObjectsClient,CudamiEntitiesClient,CudamiEntityRelationsClient,CudamiFamilyNamesClient,CudamiFileResourcesMetadataClient,CudamiGeoLocationsClient,CudamiGivenNamesClient,CudamiHumanSettlementsClient,CudamiIdentifiablesClient,CudamiIdentifierTypesClient,CudamiItemsClient,CudamiLocalesClient,CudamiPersonsClient,CudamiPredicatesClient,CudamiProjectsClient,CudamiRenderingTemplatesClient,CudamiTopicsClient,CudamiUsersClient,CudamiWebpagesClient,CudamiWebsitesClient,CudamiWorksClient
public class CudamiBaseClient<T>
extends java.lang.Object
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CudamiBaseClient(java.net.http.HttpClient http, java.lang.String serverUrl, java.lang.Class<T> targetType, com.fasterxml.jackson.databind.ObjectMapper mapper) -
Method Summary
Modifier and Type Method Description protected java.net.URIcreateFullUri(java.lang.String requestUrl)protected java.lang.StringdoDeleteRequestForString(java.lang.String requestUrl)protected TdoGetRequestForObject(java.lang.String requestUrl)protected java.lang.ObjectdoGetRequestForObject(java.lang.String requestUrl, java.lang.Class<?> targetType)protected java.util.List<T>doGetRequestForObjectList(java.lang.String requestUrl)protected java.util.ListdoGetRequestForObjectList(java.lang.String requestUrl, java.lang.Class<?> targetType)protected java.util.ListdoGetRequestForObjectList(java.lang.String requestUrl, java.lang.Class<?> targetType, de.digitalcollections.model.filter.Filtering filtering)protected de.digitalcollections.model.paging.PageResponse<T>doGetRequestForPagedObjectList(java.lang.String requestUrl, de.digitalcollections.model.paging.PageRequest pageRequest)protected de.digitalcollections.model.paging.PageResponsedoGetRequestForPagedObjectList(java.lang.String requestUrl, de.digitalcollections.model.paging.PageRequest pageRequest, java.lang.Class<?> targetType)protected java.lang.StringdoGetRequestForString(java.lang.String requestUrl)protected de.digitalcollections.model.paging.SearchPageResponse<T>doGetSearchRequestForPagedObjectList(java.lang.String requestUrl, de.digitalcollections.model.paging.SearchPageRequest searchPageRequest)protected <X> de.digitalcollections.model.paging.SearchPageResponse<X>doGetSearchRequestForPagedObjectList(java.lang.String requestUrl, de.digitalcollections.model.paging.SearchPageRequest searchPageRequest, java.lang.Class<X> type)protected java.lang.StringdoPatchRequestForString(java.lang.String requestUrl)protected java.lang.StringdoPatchRequestForString(java.lang.String requestUrl, java.lang.Object object)protected TdoPostRequestForObject(java.lang.String requestUrl)protected java.lang.ObjectdoPostRequestForObject(java.lang.String requestUrl, java.lang.Class<?> targetType)protected java.lang.ObjectdoPostRequestForObject(java.lang.String requestUrl, java.lang.Object bodyObject, java.lang.Class<?> targetType)protected TdoPostRequestForObject(java.lang.String requestUrl, T object)protected java.util.List<java.lang.Class<?>>doPostRequestForObjectList(java.lang.String requestUrl, java.util.List<java.lang.Class<?>> list, java.lang.Class<?> targetType)protected java.util.List<T>doPostRequestForObjectList(java.lang.String requestUrl, java.util.List<T> list)protected java.lang.StringdoPostRequestForString(java.lang.String requestUrl)protected java.lang.StringdoPostRequestForString(java.lang.String requestUrl, java.lang.Object object)protected java.lang.ObjectdoPutRequestForObject(java.lang.String requestUrl, java.lang.Object bodyObject, java.lang.Class<?> targetType)protected TdoPutRequestForObject(java.lang.String requestUrl, T object)protected java.util.List<java.lang.Class<?>>doPutRequestForObjectList(java.lang.String requestUrl, java.util.List<java.lang.Class<?>> list, java.lang.Class<?> targetType)protected java.lang.StringdoPutRequestForString(java.lang.String requestUrl, java.lang.Object object)de.digitalcollections.model.paging.PageResponse<T>findByLanguageAndInitial(java.lang.String baseUrl, int pageNumber, int pageSize, java.lang.String sortField, java.lang.String sortDirection, java.lang.String nullHandling, java.lang.String language, java.lang.String initial)de.digitalcollections.model.paging.PageResponse<T>findByLanguageAndInitial(java.lang.String baseUrl, de.digitalcollections.model.paging.PageRequest pageRequest, java.lang.String language, java.lang.String initial)
-
Field Details
-
http
protected final java.net.http.HttpClient http -
mapper
protected final com.fasterxml.jackson.databind.ObjectMapper mapper -
reader
protected final com.fasterxml.jackson.databind.ObjectReader reader -
serverUri
protected final java.net.URI serverUri -
targetType
-
-
Constructor Details
-
CudamiBaseClient
public CudamiBaseClient(java.net.http.HttpClient http, java.lang.String serverUrl, java.lang.Class<T> targetType, com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
createFullUri
protected java.net.URI createFullUri(java.lang.String requestUrl) -
doDeleteRequestForString
protected java.lang.String doDeleteRequestForString(java.lang.String requestUrl) throws HttpException- Throws:
HttpException
-
doGetRequestForObject
- Throws:
HttpException
-
doGetRequestForObject
protected java.lang.Object doGetRequestForObject(java.lang.String requestUrl, java.lang.Class<?> targetType) throws HttpException- Throws:
HttpException
-
doGetRequestForObjectList
protected java.util.List<T> doGetRequestForObjectList(java.lang.String requestUrl) throws HttpException- Throws:
HttpException
-
doGetRequestForObjectList
protected java.util.List doGetRequestForObjectList(java.lang.String requestUrl, java.lang.Class<?> targetType) throws HttpException- Throws:
HttpException
-
doGetRequestForObjectList
protected java.util.List doGetRequestForObjectList(java.lang.String requestUrl, java.lang.Class<?> targetType, de.digitalcollections.model.filter.Filtering filtering) throws HttpException- Throws:
HttpException
-
doGetRequestForPagedObjectList
protected de.digitalcollections.model.paging.PageResponse<T> doGetRequestForPagedObjectList(java.lang.String requestUrl, de.digitalcollections.model.paging.PageRequest pageRequest) throws HttpException- Throws:
HttpException
-
doGetRequestForPagedObjectList
protected de.digitalcollections.model.paging.PageResponse doGetRequestForPagedObjectList(java.lang.String requestUrl, de.digitalcollections.model.paging.PageRequest pageRequest, java.lang.Class<?> targetType) throws HttpException- Throws:
HttpException
-
doGetRequestForString
- Throws:
HttpException
-
doGetSearchRequestForPagedObjectList
protected <X> de.digitalcollections.model.paging.SearchPageResponse<X> doGetSearchRequestForPagedObjectList(java.lang.String requestUrl, de.digitalcollections.model.paging.SearchPageRequest searchPageRequest, java.lang.Class<X> type) throws HttpException- Throws:
HttpException
-
doGetSearchRequestForPagedObjectList
protected de.digitalcollections.model.paging.SearchPageResponse<T> doGetSearchRequestForPagedObjectList(java.lang.String requestUrl, de.digitalcollections.model.paging.SearchPageRequest searchPageRequest) throws HttpException- Throws:
HttpException
-
doPatchRequestForString
protected java.lang.String doPatchRequestForString(java.lang.String requestUrl) throws HttpException- Throws:
HttpException
-
doPatchRequestForString
protected java.lang.String doPatchRequestForString(java.lang.String requestUrl, java.lang.Object object) throws HttpException- Throws:
HttpException
-
doPostRequestForObject
- Throws:
HttpException
-
doPostRequestForObject
protected java.lang.Object doPostRequestForObject(java.lang.String requestUrl, java.lang.Object bodyObject, java.lang.Class<?> targetType) throws HttpException- Throws:
HttpException
-
doPostRequestForObject
- Throws:
HttpException
-
doPostRequestForObject
protected java.lang.Object doPostRequestForObject(java.lang.String requestUrl, java.lang.Class<?> targetType) throws HttpException- Throws:
HttpException
-
doPostRequestForObjectList
protected java.util.List<T> doPostRequestForObjectList(java.lang.String requestUrl, java.util.List<T> list) throws HttpException- Throws:
HttpException
-
doPostRequestForObjectList
protected java.util.List<java.lang.Class<?>> doPostRequestForObjectList(java.lang.String requestUrl, java.util.List<java.lang.Class<?>> list, java.lang.Class<?> targetType) throws HttpException- Throws:
HttpException
-
doPostRequestForString
protected java.lang.String doPostRequestForString(java.lang.String requestUrl) throws HttpException- Throws:
HttpException
-
doPostRequestForString
protected java.lang.String doPostRequestForString(java.lang.String requestUrl, java.lang.Object object) throws HttpException- Throws:
HttpException
-
doPutRequestForObject
- Throws:
HttpException
-
doPutRequestForObject
protected java.lang.Object doPutRequestForObject(java.lang.String requestUrl, java.lang.Object bodyObject, java.lang.Class<?> targetType) throws HttpException- Throws:
HttpException
-
doPutRequestForObjectList
protected java.util.List<java.lang.Class<?>> doPutRequestForObjectList(java.lang.String requestUrl, java.util.List<java.lang.Class<?>> list, java.lang.Class<?> targetType) throws HttpException- Throws:
HttpException
-
doPutRequestForString
protected java.lang.String doPutRequestForString(java.lang.String requestUrl, java.lang.Object object) throws HttpException- Throws:
HttpException
-
findByLanguageAndInitial
public de.digitalcollections.model.paging.PageResponse<T> findByLanguageAndInitial(java.lang.String baseUrl, de.digitalcollections.model.paging.PageRequest pageRequest, java.lang.String language, java.lang.String initial) throws HttpException- Throws:
HttpException
-
findByLanguageAndInitial
public de.digitalcollections.model.paging.PageResponse<T> findByLanguageAndInitial(java.lang.String baseUrl, int pageNumber, int pageSize, java.lang.String sortField, java.lang.String sortDirection, java.lang.String nullHandling, java.lang.String language, java.lang.String initial) throws HttpException- Throws:
HttpException
-