Class ServletScim

java.lang.Object
com.revetsec.servlet.jakarta.ServletScim

@ThreadSafe public final class ServletScim extends Object
Thin raw-input SCIM transport helpers for application-routed Servlet endpoints. The application selects the caller, tenant, resource type and transaction. Acquire raw headers and the body before Servlet parameter decoding; then invoke core's header-aware parser. Container and trusted-edge limits must also bound upstream body/header allocation.
Since:
1.0.0
  • Method Details

    • queryResultFor

      @CheckReturnValue public static @NonNull ScimQueryParseResult queryResultFor(@NonNull ScimServiceProvider provider, @NonNull ScimResourceType resourceType, @NonNull jakarta.servlet.http.HttpServletRequest request)
      Parses the unchanged resource-list query without Servlet parameter decoding.
      Parameters:
      provider - the configured service provider
      resourceType - the application-selected registered resource type
      request - the routed request
      Returns:
      the core query result
      Since:
      1.0.0
    • attributeSelectionResultFor

      @CheckReturnValue public static @NonNull ScimAttributeSelectionResult attributeSelectionResultFor(@NonNull ScimServiceProvider provider, @NonNull ScimResourceType resourceType, @NonNull jakarta.servlet.http.HttpServletRequest request)
      Parses response projection from the unchanged query.
      Parameters:
      provider - the configured service provider
      resourceType - the application-selected registered resource type
      request - the routed request
      Returns:
      the core selection result
      Since:
      1.0.0
    • ifMatchResultFor

      @CheckReturnValue public static @NonNull ScimIfMatchResult ifMatchResultFor(@NonNull ScimServiceProvider provider, @NonNull ScimResource current, @NonNull jakarta.servlet.http.HttpServletRequest request)
      Checks original If-Match occurrences against the same resource used by the transaction.
      Parameters:
      provider - the configured service provider
      current - the authoritative current resource
      request - the routed request
      Returns:
      the core conditional result
      Since:
      1.0.0
    • ifNoneMatchResultFor

      @CheckReturnValue public static @NonNull ScimIfNoneMatchResult ifNoneMatchResultFor(@NonNull ScimServiceProvider provider, @NonNull ScimResource current, @NonNull jakarta.servlet.http.HttpServletRequest request)
      Checks original If-None-Match occurrences for application-routed GET or HEAD handling.
      Parameters:
      provider - the configured service provider
      current - the authoritative current resource
      request - the routed request
      Returns:
      the core conditional result
      Since:
      1.0.0
    • contentTypeHeaderValuesFor

      @CheckReturnValue public static @NonNull List<@NonNull String> contentTypeHeaderValuesFor(@NonNull jakarta.servlet.http.HttpServletRequest request)
      Returns original Content-Type occurrences, read lazily up to the rejecting second occurrence. The list is scoped to this request; it never joins, splits or decodes header values.
      Parameters:
      request - the routed request
      Returns:
      the bounded original occurrences for core's header-aware body parser
      Since:
      1.0.0
    • bodyResultFor

      @CheckReturnValue public static @NonNull ServletScimBodyResult bodyResultFor(@NonNull ScimServiceProvider provider, @NonNull jakarta.servlet.http.HttpServletRequest request)
      Reads at most the provider's body limit plus one overflow byte without closing its stream. Overflow releases no bytes. I/O failure releases no partial bytes; interrupted reads preserve the interrupt flag. A thread already interrupted does not acquire the stream.
      Parameters:
      provider - the configured service provider supplying the body cap
      request - the routed request whose body has not been consumed
      Returns:
      unchanged bounded bytes, an explicit size rejection, or unavailable input
      Since:
      1.0.0
    • writeResponse

      public static void writeResponse(@NonNull jakarta.servlet.http.HttpServletResponse response, @NonNull ScimResponse prepared) throws IOException
      Writes exact prepared status, physical header values and personal-data body bytes. Call only after confirmed persistence for writes. No flushing, stream closing, URL rewriting or JSON marshalling is performed. The application owns HEAD suppression where applicable.
      Parameters:
      response - the application-owned transport response
      prepared - the core-prepared bounded response
      Throws:
      IOException - if the Servlet output stream fails
      Since:
      1.0.0