Interface JsonConfig


public interface JsonConfig
Interface for objects that provide JSON configuration strings.

This interface allows JSON configuration to be passed in a type-safe way and works seamlessly with records:

 record ConfigHolder(String json) implements JsonConfig {}
 
Since:
Apache Tika 4.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the JSON configuration string.
    default boolean
    Operator-authored (config file, presets), as opposed to per-request input.
    static JsonConfig
    Operator-authored JSON, e.g. built by the caller's own code rather than a request.
  • Method Details

    • json

      String json()
      Returns the JSON configuration string.
      Returns:
      the JSON configuration
    • trusted

      default boolean trusted()
      Operator-authored (config file, presets), as opposed to per-request input. Untrusted config may not set an OperatorOnly property.
    • trusted

      static JsonConfig trusted(String json)
      Operator-authored JSON, e.g. built by the caller's own code rather than a request.