Package com.unboundid.scim2.server.utils
Class SimpleSearchResults<T extends ScimResource>
- java.lang.Object
-
- com.unboundid.scim2.server.ListResponseStreamingOutput<T>
-
- com.unboundid.scim2.server.utils.SimpleSearchResults<T>
-
- All Implemented Interfaces:
jakarta.ws.rs.core.StreamingOutput
public class SimpleSearchResults<T extends ScimResource> extends ListResponseStreamingOutput<T>
A utility ListResponseStreamingOutput that will filter, sort, and paginate the search results for simple search implementations that always returns the entire result set.
-
-
Constructor Summary
Constructors Constructor Description SimpleSearchResults(ResourceTypeDefinition resourceType, jakarta.ws.rs.core.UriInfo uriInfo)Create a new SimpleSearchResults for results from a search operation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleSearchResultsadd(T resource)Add a resource to include in the search results.SimpleSearchResultsaddAll(Collection<T> resources)Add resources to include in the search results.voidwrite(ListResponseWriter<T> os)Start streaming the contents of the list response.-
Methods inherited from class com.unboundid.scim2.server.ListResponseStreamingOutput
write
-
-
-
-
Constructor Detail
-
SimpleSearchResults
public SimpleSearchResults(@NotNull ResourceTypeDefinition resourceType, @NotNull jakarta.ws.rs.core.UriInfo uriInfo) throws BadRequestException
Create a new SimpleSearchResults for results from a search operation.- Parameters:
resourceType- The resource type definition of result resources.uriInfo- The UriInfo from the search operation.- Throws:
BadRequestException- if the filter or paths in the search operation is invalid.
-
-
Method Detail
-
add
@NotNull public SimpleSearchResults add(@NotNull T resource) throws ScimException
Add a resource to include in the search results.- Parameters:
resource- The resource to add.- Returns:
- this object.
- Throws:
ScimException- If an error occurs during filtering or setting the meta attributes.
-
addAll
@NotNull public SimpleSearchResults addAll(@NotNull Collection<T> resources) throws ScimException
Add resources to include in the search results.- Parameters:
resources- The resources to add.- Returns:
- this object.
- Throws:
ScimException- If an error occurs during filtering or setting the meta attributes.
-
write
public void write(@NotNull ListResponseWriter<T> os) throws IOException
Start streaming the contents of the list response. The list response will be considered complete upon return;- Specified by:
writein classListResponseStreamingOutput<T extends ScimResource>- Parameters:
os- The list response output stream used to stream back elements of the list response.- Throws:
IOException- if an error occurs while writing.
-
-