Class ScimListPage.Builder
java.lang.Object
com.revetsec.scim.ScimListPage.Builder
- Enclosing class:
ScimListPage
Mutable complete page configuration. Defaults are empty resources, absent total/cursors and
moreResultsAvailable false. Setters replace complete values; build checks the combined framing.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Checks combined counts, cursors, resource-type identity and page framing, then creates the page.moreResultsAvailable(@Nullable Boolean value) Replaces the more-results declaration; null restores false.nextCursor(@Nullable String value) Replaces the next-page token; null restores absence.previousCursor(@Nullable String value) Replaces the previous-page token; null restores absence.resources(@Nullable List<@NonNull ScimResource> value) Replaces the complete resource snapshot.totalResults(@Nullable Long value) Replaces the application's accurate nonnegative matching-resource total; null restores absence.
-
Method Details
-
resources
Replaces the complete resource snapshot.- Parameters:
value- resources or null for empty- Returns:
- this builder
- Since:
- 1.0.0
-
totalResults
Replaces the application's accurate nonnegative matching-resource total; null restores absence. INDEX and count-only framing require a total even when no resources are returned.- Parameters:
value- the declared total, or null to omit it- Returns:
- this builder
- Since:
- 1.0.0
-
nextCursor
Replaces the next-page token; null restores absence. A token must be nonempty unreserved ASCII within the query's cursor bound. The application owns its authenticity, context and validity. Presence must agree with moreResultsAvailable.- Parameters:
value- the complete next token, or null for absence- Returns:
- this builder
- Since:
- 1.0.0
-
previousCursor
Replaces the previous-page token; null restores absence. A token must be nonempty unreserved ASCII within the query's cursor bound. The application owns its authenticity, context and validity; first, INDEX and count-only pages forbid it.- Parameters:
value- the complete previous token, or null for absence- Returns:
- this builder
- Since:
- 1.0.0
-
moreResultsAvailable
Replaces the more-results declaration; null restores false. CURSOR framing requires true exactly when nextCursor is present. INDEX and count-only pages require false.- Parameters:
value- the complete declaration, or null for false- Returns:
- this builder
- Since:
- 1.0.0
-
build
Checks combined counts, cursors, resource-type identity and page framing, then creates the page. This does not verify storage/count accuracy or token authenticity. INDEX requires totalResults and a consistent window; CURSOR requires nextCursor iff moreResultsAvailable and no previous cursor on the first page. Count-only pages require an accurate total, empty resources and no traversal cursors or more-results declaration.- Returns:
- the immutable page
- Throws:
IllegalArgumentException- if trusted page values violate the query's bounds or framing- Since:
- 1.0.0
-