Interface RestSearchService

All Known Implementing Classes:
RestSearchServiceImpl

public interface RestSearchService
  • 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 for
      uriInfo - 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 for
      uriInfo - the uri info
      allowedPaths - 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 for
      uriInfo - 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 for
      searchBean - 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 for
      searchBean - the search bean
      allowedPaths - 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

      SearchRequest.Builder buildCountRequestFromBean(String modelName, EntitySearchBean searchBean)
      build a SearchRequest from a search bean to count entities
      Parameters:
      modelName - the model to build the request for
      searchBean - the search bean
      Returns:
      a builder prefilled with the passed arguments
    • executeSearchRequest

      SearchResult executeSearchRequest(SearchRequest searchRequest)
      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 request
      uriBuilder - 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 request
      uriBuilder - 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

      CountBean executeCountRequest(SearchRequest searchRequest)
      execute a count
      Parameters:
      searchRequest - the count request
      Returns:
      the count bean filled with the result
    • getPagination

      Pagination getPagination(jakarta.ws.rs.core.UriInfo uriInfo)
      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)