Interface RestSearchService
- All Known Implementing Classes:
RestSearchServiceImpl
public interface RestSearchService
-
Method Summary
Modifier and TypeMethodDescriptionbuildCountRequestFromBean
(String modelName, EntitySearchBean searchBean) build a SearchRequest from a search bean to count entitiesbuildCountRequestFromUri
(String modelName, jakarta.ws.rs.core.UriInfo uriInfo) build a SearchRequest from arguments passed to the URI to count entitiesdefault SearchRequest.Builder
buildSearchRequestFromBean
(String modelName, EntitySearchBean searchBean) build a SearchRequest from a search bean to search entitiesbuildSearchRequestFromBean
(String modelName, EntitySearchBean searchBean, @Nullable Set<String> allowedPaths) build a SearchRequest from a search bean to search entitiesdefault SearchRequest.Builder
buildSearchRequestFromUri
(String modelName, jakarta.ws.rs.core.UriInfo uriInfo) build a SearchRequest from arguments passed to the URI to search for entitiesbuildSearchRequestFromUri
(String modelName, jakarta.ws.rs.core.UriInfo uriInfo, @Nullable Set<String> allowedPaths) build a SearchRequest from arguments passed to the URI to search for entitiescreateCollectionBean
(SearchResult searchResult, jakarta.ws.rs.core.UriBuilder uriBuilder) executeCountRequest
(SearchRequest searchRequest) execute a countexecuteSearchRequest
(SearchRequest searchRequest) execute a search but don't wrap result in bean yetexecuteSearchRequest
(SearchRequest searchRequest, jakarta.ws.rs.core.UriBuilder uriBuilder) execute a searchexecuteSearchRequestWithSelectors
(SearchRequest searchRequest, jakarta.ws.rs.core.UriBuilder uriBuilder) execute a path search request with selector supportgetPagination
(jakarta.ws.rs.core.UriInfo uriInfo) get pagination from uri info (offset and limit)
-
Method Details
-
buildSearchRequestFromUri
default SearchRequest.Builder buildSearchRequestFromUri(String modelName, jakarta.ws.rs.core.UriInfo uriInfo) build a SearchRequest from arguments passed to the URI to search for entities- Parameters:
modelName
- the model to build the request foruriInfo
- the uri info- Returns:
- a builder prefilled with the passed arguments
-
buildSearchRequestFromUri
SearchRequest.Builder buildSearchRequestFromUri(String modelName, jakarta.ws.rs.core.UriInfo uriInfo, @Nullable @Nullable Set<String> allowedPaths) build a SearchRequest from arguments passed to the URI to search for entities- Parameters:
modelName
- the model to build the request foruriInfo
- the uri infoallowedPaths
- a set of paths, if this set is passed (e.g. != null) only paths in this set will be added- Returns:
- a builder prefilled with the passed arguments
-
buildCountRequestFromUri
SearchRequest.Builder buildCountRequestFromUri(String modelName, jakarta.ws.rs.core.UriInfo uriInfo) build a SearchRequest from arguments passed to the URI to count entities- Parameters:
modelName
- the model to build the request foruriInfo
- the uri info- Returns:
- a builder prefilled with the passed arguments
-
buildSearchRequestFromBean
default SearchRequest.Builder buildSearchRequestFromBean(String modelName, EntitySearchBean searchBean) build a SearchRequest from a search bean to search entities- Parameters:
modelName
- the model to build the request forsearchBean
- the search bean- Returns:
- a builder prefilled with the passed arguments
-
buildSearchRequestFromBean
SearchRequest.Builder buildSearchRequestFromBean(String modelName, EntitySearchBean searchBean, @Nullable @Nullable Set<String> allowedPaths) build a SearchRequest from a search bean to search entities- Parameters:
modelName
- the model to build the request forsearchBean
- the search beanallowedPaths
- a set of paths, if this set is passed (e.g. != null) only paths in this set will be added- Returns:
- a builder prefilled with the passed arguments
-
buildCountRequestFromBean
build a SearchRequest from a search bean to count entities- Parameters:
modelName
- the model to build the request forsearchBean
- the search bean- Returns:
- a builder prefilled with the passed arguments
-
executeSearchRequest
execute a search but don't wrap result in bean yet- Parameters:
searchRequest
- the search request- Returns:
- the search result
-
executeSearchRequest
CollectionBean executeSearchRequest(SearchRequest searchRequest, jakarta.ws.rs.core.UriBuilder uriBuilder) execute a search- Parameters:
searchRequest
- the search requesturiBuilder
- the uri builder used for paging- Returns:
- the collection bean filled with the result
-
executeSearchRequestWithSelectors
CollectionBean executeSearchRequestWithSelectors(SearchRequest searchRequest, jakarta.ws.rs.core.UriBuilder uriBuilder) execute a path search request with selector support- Parameters:
searchRequest
- the search requesturiBuilder
- the uri builder used for paging- Returns:
- the collection bean filled with the result
-
createCollectionBean
CollectionBean createCollectionBean(SearchResult searchResult, jakarta.ws.rs.core.UriBuilder uriBuilder) -
executeCountRequest
execute a count- Parameters:
searchRequest
- the count request- Returns:
- the count bean filled with the result
-
getPagination
get pagination from uri info (offset and limit)- Parameters:
uriInfo
- the uri info- Returns:
- the pagination with the given offset and limit (or with the defaults)
-