Class SearchRequestBuilder

    • Constructor Detail

      • SearchRequestBuilder

        public SearchRequestBuilder​(jakarta.ws.rs.client.WebTarget target)
        Create a new search request builder.
        Parameters:
        target - The WebTarget to search.
    • Method Detail

      • filter

        public SearchRequestBuilder filter​(String filter)
        Request filtering of resources.
        Parameters:
        filter - the filter string used to request a subset of resources.
        Returns:
        This builder.
      • sort

        public SearchRequestBuilder sort​(String sortBy,
                                         SortOrder sortOrder)
        Request sorting of resources.
        Parameters:
        sortBy - the string indicating the attribute whose value shall be used to order the returned responses.
        sortOrder - the order in which the sortBy parameter is applied.
        Returns:
        This builder.
      • page

        public SearchRequestBuilder page​(int startIndex,
                                         int count)
        Request pagination of resources.
        Parameters:
        startIndex - the 1-based index of the first query result.
        count - the desired maximum number of query results per page.
        Returns:
        This builder.
      • invoke

        public <T> ListResponse<T> invoke​(Class<T> cls)
                                   throws ScimException
        Invoke the SCIM retrieve request using GET.
        Type Parameters:
        T - The type of objects to return.
        Parameters:
        cls - The Java class object used to determine the type to return.
        Returns:
        The ListResponse containing the search results.
        Throws:
        ScimException - If an error occurred.
      • invoke

        public <T> void invoke​(SearchResultHandler<T> resultHandler,
                               Class<T> cls)
                        throws ScimException
        Invoke the SCIM retrieve request using GET.
        Type Parameters:
        T - The type of objects to return.
        Parameters:
        resultHandler - The search result handler that should be used to process the resources.
        cls - The Java class object used to determine the type to return.
        Throws:
        ScimException - If an error occurred.
      • invokePost

        public <T extends ScimResourceListResponse<T> invokePost​(Class<T> cls)
                                                            throws ScimException
        Invoke the SCIM retrieve request using POST.
        Type Parameters:
        T - The type of objects to return.
        Parameters:
        cls - The Java class object used to determine the type to return.
        Returns:
        The ListResponse containing the search results.
        Throws:
        ScimException - If an error occurred.
      • invokePost

        public <T> void invokePost​(SearchResultHandler<T> resultHandler,
                                   Class<T> cls)
                            throws ScimException
        Invoke the SCIM retrieve request using POST.
        Type Parameters:
        T - The type of objects to return.
        Parameters:
        resultHandler - The search result handler that should be used to process the resources.
        cls - The Java class object used to determine the type to return.
        Throws:
        ScimException - If an error occurred.