Class NuggetAdminContract

java.lang.Object
org.j7m.middleware.operations.api.NuggetAdminContract

public final class NuggetAdminContract extends Object
Stable public constants for the Phase 7.8 nugget administration contract.

The constants define the transport-neutral public contract used by CLI clients, deterministic JSON artifacts, tests, demos, and future adapters. They do not start listeners, select an HTTP shape, or grant admission or authorization. Implementations must reject unsupported request protocol versions before performing admission, authorization, provider calls, lifecycle mutation, control callbacks, or audit mutation.

This type is immutable and thread-safe.

  • Field Details

    • PROTOCOL_VERSION

      public static final int PROTOCOL_VERSION
      Stable request/response protocol version for the public admin contract.
      See Also:
    • JSON_FORMAT_NAME

      public static final String JSON_FORMAT_NAME
      Stable JSON format name for normative fixtures and schema documents.
      See Also:
    • JSON_FORMAT_VERSION

      public static final int JSON_FORMAT_VERSION
      Stable JSON schema/format version for Phase 7.8 artifacts.
      See Also:
    • MAX_METADATA_ENTRIES

      public static final int MAX_METADATA_ENTRIES
      Maximum safe request metadata entries retained by public DTOs.
      See Also:
    • MAX_METADATA_KEY_UTF8_BYTES

      public static final int MAX_METADATA_KEY_UTF8_BYTES
      Maximum metadata key length in UTF-8 bytes.
      See Also:
    • MAX_METADATA_VALUE_UTF8_BYTES

      public static final int MAX_METADATA_VALUE_UTF8_BYTES
      Maximum metadata value length in UTF-8 bytes.
      See Also:
    • MAX_METADATA_AGGREGATE_UTF8_BYTES

      public static final int MAX_METADATA_AGGREGATE_UTF8_BYTES
      Maximum aggregate metadata key and value content retained in UTF-8 bytes.
      See Also:
    • MAX_TOKEN_UTF8_BYTES

      public static final int MAX_TOKEN_UTF8_BYTES
      Maximum generic token length in UTF-8 bytes.
      See Also:
    • MAX_TEXT_UTF8_BYTES

      public static final int MAX_TEXT_UTF8_BYTES
      Maximum generic safe text length in UTF-8 bytes.
      See Also:
    • MAX_WARNING_ENTRIES

      public static final int MAX_WARNING_ENTRIES
      Maximum warning entries retained by public result headers.
      See Also:
    • MAX_WARNING_UTF8_BYTES

      public static final int MAX_WARNING_UTF8_BYTES
      Maximum safe warning length in UTF-8 bytes.
      See Also:
    • MAX_PAGE_LIMIT

      public static final int MAX_PAGE_LIMIT
      Maximum collection page size accepted by public query DTOs.
      See Also:
    • DEFAULT_PAGE_LIMIT

      public static final int DEFAULT_PAGE_LIMIT
      Default collection page size when callers omit a limit.
      See Also:
    • MAX_FILTERS

      public static final int MAX_FILTERS
      Maximum filter clauses accepted by public query DTOs.
      See Also:
    • MAX_SORTS

      public static final int MAX_SORTS
      Maximum sort clauses accepted by public query DTOs before tie-breaker insertion.
      See Also:
    • MAX_OFFSET

      public static final long MAX_OFFSET
      Maximum offset accepted by public query JSON artifacts before semantic offset-plus-limit validation.
      See Also:
    • MAX_COUNT

      public static final long MAX_COUNT
      Maximum count value for public long count fields.
      See Also:
    • MAX_DURATION_MILLIS

      public static final long MAX_DURATION_MILLIS
      Maximum scalar millisecond duration representable by public JSON artifacts without overflow.
      See Also:
    • MAX_DURATION

      public static final Duration MAX_DURATION
      Maximum duration retained by public DTOs that render scalar milliseconds in JSON.
    • MAX_CLIENT_BUDGET

      public static final Duration MAX_CLIENT_BUDGET
      Maximum client-supplied budget metadata retained in a request context.
    • DEFAULT_CLIENT_BUDGET

      public static final Duration DEFAULT_CLIENT_BUDGET
      Default client budget metadata when no budget is supplied.
    • TYPED_PUBLIC_DTO_PAYLOAD_TYPE

      public static final String TYPED_PUBLIC_DTO_PAYLOAD_TYPE
      Stable generic payload type id for typed public DTOs without a narrower schema id.
      See Also:
  • Method Details

    • requireSupportedProtocol

      public static void requireSupportedProtocol(int protocolVersion)
      Verifies that a caller requested the current public admin protocol.
      Parameters:
      protocolVersion - requested protocol version
      Throws:
      IllegalArgumentException - if the version is unsupported