Package org.apache.tapestry5.rest.jackson.modules

# Class RestJacksonModule

java.lang.Object
org.apache.tapestry5.rest.jackson.modules.RestJacksonModule

public class RestJacksonModule extends Object
Defines services and and contributions for the Tapestry integration with Jackson Databind. Besides contributing a fallback `ObjectMapperSource`, it also creates a `ComponentEventResultProcessor` for all classes returned by `MappedEntityManager.getEntities()`.

Since:
  5.8.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RestJacksonModule()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ObjectMapperSource`
  `buildObjectMapperSource(List<ObjectMapperSource> configuration, ChainBuilder chainBuilder)`
  Builds the `ObjectMapperSource` service.
  `static com.github.victools.jsonschema.generator.SchemaGenerator`
  `buildSchemaGenerator()`
  Provides the default `SchemaGenerator` instance with a default configuration.
  `static void`
  `contributeComponentEventResultProcessor(MappedConfiguration<Class,ComponentEventResultProcessor> configuration, MappedEntityManager mappedEntityManager, Response response, ObjectMapperSource objectMapperSource, String outputEncoding)`
  Adds a (entity class, JacksonComponentEventResultProcessor) for each entity class returned by `MappedEntityManager.getEntities()`.
  `static void`
  `contributeHttpRequestBodyConverter(OrderedConfiguration<HttpRequestBodyConverter> configuration)`
  Contributes `JacksonHttpRequestBodyConverter` to the `HttpRequestBodyConverter` service.
  `static void`
  `contributeObjectMapperSource(OrderedConfiguration<ObjectMapperSource> configuration)`
  Contributes `FallbackObjectMapperSource` (contribution id `Fallback`) so we guarantee there's always an `ObjectMapper` provided for any type.
  `static void`
  `contributeOpenApiTypeDescriber(OrderedConfiguration<OpenApiTypeDescriber> configuration)`
  Contributes `JacksonOpenApiTypeDescriber` to the `OpenApiTypeDescriber` service to generate J.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### RestJacksonModule

    public RestJacksonModule()

- ## Method Details

  - ### contributeObjectMapperSource

    public static void contributeObjectMapperSource(OrderedConfiguration<ObjectMapperSource> configuration)
    Contributes `FallbackObjectMapperSource` (contribution id `Fallback`) so we guarantee there's always an `ObjectMapper` provided for any type.

  - ### contributeComponentEventResultProcessor

    public static void contributeComponentEventResultProcessor(MappedConfiguration<Class,ComponentEventResultProcessor> configuration, MappedEntityManager mappedEntityManager, Response response, ObjectMapperSource objectMapperSource, @Symbol("tapestry.charset") String outputEncoding)
    Adds a (entity class, JacksonComponentEventResultProcessor) for each entity class returned by `MappedEntityManager.getEntities()`.

  - ### contributeHttpRequestBodyConverter

    public static void contributeHttpRequestBodyConverter(OrderedConfiguration<HttpRequestBodyConverter> configuration)
    Contributes `JacksonHttpRequestBodyConverter` to the `HttpRequestBodyConverter` service.

  - ### buildObjectMapperSource

    public static ObjectMapperSource buildObjectMapperSource(List<ObjectMapperSource> configuration, ChainBuilder chainBuilder)
    Builds the `ObjectMapperSource` service.

  - ### buildSchemaGenerator

    public static com.github.victools.jsonschema.generator.SchemaGenerator buildSchemaGenerator()
    Provides the default `SchemaGenerator` instance with a default configuration.

  - ### contributeOpenApiTypeDescriber

    public static void contributeOpenApiTypeDescriber(OrderedConfiguration<OpenApiTypeDescriber> configuration)
    Contributes `JacksonOpenApiTypeDescriber` to the `OpenApiTypeDescriber` service to generate J.