Class CudamiIdentifiablesClient<I extends de.digitalcollections.model.identifiable.Identifiable>
- java.lang.Object
-
- de.digitalcollections.client.BaseRestClient<T>
-
- de.digitalcollections.cudami.client.CudamiRestClient<I>
-
- de.digitalcollections.cudami.client.identifiable.CudamiIdentifiablesClient<I>
-
- Direct Known Subclasses:
CudamiEntitiesClient,CudamiFamilyNamesClient,CudamiFileResourcesMetadataClient,CudamiGivenNamesClient,CudamiImageFileResourcesClient,CudamiLinkedDataFileResourcesClient,CudamiWebpagesClient
public class CudamiIdentifiablesClient<I extends de.digitalcollections.model.identifiable.Identifiable> extends CudamiRestClient<I>
-
-
Field Summary
-
Fields inherited from class de.digitalcollections.cudami.client.CudamiRestClient
API_VERSION_PREFIX
-
Fields inherited from class de.digitalcollections.client.BaseRestClient
baseEndpoint, http, mapper, reader, serverUri, targetType
-
-
Constructor Summary
Constructors Constructor Description CudamiIdentifiablesClient(HttpClient http, String serverUrl, com.fasterxml.jackson.databind.ObjectMapper mapper)CudamiIdentifiablesClient(HttpClient http, String serverUrl, Class<I> identifiableClass, com.fasterxml.jackson.databind.ObjectMapper mapper, String baseEndpoint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringfilterCriterionToUrlParam(de.digitalcollections.model.list.filtering.FilterCriterion filterCriterion)List<I>find(String searchTerm, int maxResults)de.digitalcollections.model.list.paging.PageResponse<I>findByLanguageAndInitial(int pageNumber, int pageSize, String sortField, String sortDirection, String nullHandling, String language, String initial)de.digitalcollections.model.list.paging.PageResponse<I>findByLanguageAndInitial(de.digitalcollections.model.list.paging.PageRequest pageRequest, String language, String initial)IgetByIdentifier(String namespace, String id)Retrieves an Identifiable by its namespace and idIgetByIdentifier(String namespace, String id, Map<String,String> additionalParameters)Retrieves an Identifiable by its namespace and id and appends additional parameters to the requestIgetByUuidAndLocale(UUID uuid, String locale)IgetByUuidAndLocale(UUID uuid, Locale locale)List<Locale>getLanguages()de.digitalcollections.model.identifiable.alias.LocalizedUrlAliasesgetLocalizedUrlAliases(UUID uuid)-
Methods inherited from class de.digitalcollections.cudami.client.CudamiRestClient
count, deleteByUuid, find, getAll, getByUuid, save, update
-
Methods inherited from class de.digitalcollections.client.BaseRestClient
create, createFullUri, doDeleteRequestForString, doGetRequestForObject, doGetRequestForObject, doGetRequestForObjectList, doGetRequestForObjectList, doGetRequestForObjectList, doGetRequestForPagedObjectList, doGetRequestForPagedObjectList, doGetRequestForString, doPatchRequestForString, doPatchRequestForString, doPostRequestForObject, doPostRequestForObject, doPostRequestForObject, doPostRequestForObject, doPostRequestForObjectList, doPostRequestForObjectList, doPostRequestForString, doPostRequestForString, doPutRequestForObject, doPutRequestForObject, doPutRequestForObjectList, doPutRequestForString, getBaseEndpoint
-
-
-
-
Constructor Detail
-
CudamiIdentifiablesClient
public CudamiIdentifiablesClient(HttpClient http, String serverUrl, Class<I> identifiableClass, com.fasterxml.jackson.databind.ObjectMapper mapper, String baseEndpoint)
-
CudamiIdentifiablesClient
public CudamiIdentifiablesClient(HttpClient http, String serverUrl, com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Detail
-
filterCriterionToUrlParam
protected String filterCriterionToUrlParam(de.digitalcollections.model.list.filtering.FilterCriterion filterCriterion)
- Overrides:
filterCriterionToUrlParamin classBaseRestClient<I extends de.digitalcollections.model.identifiable.Identifiable>
-
find
public List<I> find(String searchTerm, int maxResults) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
findByLanguageAndInitial
public de.digitalcollections.model.list.paging.PageResponse<I> findByLanguageAndInitial(de.digitalcollections.model.list.paging.PageRequest pageRequest, String language, String initial) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
findByLanguageAndInitial
public de.digitalcollections.model.list.paging.PageResponse<I> findByLanguageAndInitial(int pageNumber, int pageSize, String sortField, String sortDirection, String nullHandling, String language, String initial) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
getByIdentifier
public I getByIdentifier(String namespace, String id, Map<String,String> additionalParameters) throws de.digitalcollections.model.exception.TechnicalException
Retrieves an Identifiable by its namespace and id and appends additional parameters to the request- Parameters:
namespace- the namespace. Must be plain text, not encoded in any wayid- the id. Must be in plain text, not encoded in any wayadditionalParameters- a map<String,String> of additional parameters- Returns:
- the Identifiable or null
- Throws:
de.digitalcollections.model.exception.TechnicalException- in case of an error
-
getByIdentifier
public I getByIdentifier(String namespace, String id) throws de.digitalcollections.model.exception.TechnicalException
Retrieves an Identifiable by its namespace and id- Parameters:
namespace- the namespace. Must be plain text, not encoded in any wayid- the id. Must be in plain text, not encoded in any way- Returns:
- the Identifiable or null
- Throws:
de.digitalcollections.model.exception.TechnicalException- in case of an error
-
getByUuidAndLocale
public I getByUuidAndLocale(UUID uuid, Locale locale) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
getByUuidAndLocale
public I getByUuidAndLocale(UUID uuid, String locale) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
getLanguages
public List<Locale> getLanguages() throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
getLocalizedUrlAliases
public de.digitalcollections.model.identifiable.alias.LocalizedUrlAliases getLocalizedUrlAliases(UUID uuid) throws de.digitalcollections.model.exception.TechnicalException
- Throws:
de.digitalcollections.model.exception.TechnicalException
-
-