Class RestJacksonModule
- java.lang.Object
-
- org.apache.tapestry5.rest.jackson.modules.RestJacksonModule
-
public class RestJacksonModule extends java.lang.Object
Defines services and and contributions for the Tapestry integration with Jackson Databind. Besides contributing a fallbackObjectMapperSource
, it also creates aComponentEventResultProcessor
for all classes returned byMappedEntityManager.getEntities()
.- Since:
- 5.8.0
-
-
Constructor Summary
Constructors Constructor Description RestJacksonModule()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectMapperSource
buildObjectMapperSource(java.util.List<ObjectMapperSource> configuration, ChainBuilder chainBuilder)
Builds theObjectMapperSource
service.static com.github.victools.jsonschema.generator.SchemaGenerator
buildSchemaGenerator()
Provides the defaultSchemaGenerator
instance with a default configuration.static void
contributeComponentEventResultProcessor(MappedConfiguration<java.lang.Class,ComponentEventResultProcessor> configuration, MappedEntityManager mappedEntityManager, Response response, ObjectMapperSource objectMapperSource, java.lang.String outputEncoding)
Adds a (entity class, JacksonComponentEventResultProcessor) for each entity class returned byMappedEntityManager.getEntities()
.static void
contributeHttpRequestBodyConverter(OrderedConfiguration<HttpRequestBodyConverter> configuration)
ContributesJacksonHttpRequestBodyConverter
to theHttpRequestBodyConverter
service.static void
contributeObjectMapperSource(OrderedConfiguration<ObjectMapperSource> configuration)
ContributesFallbackObjectMapperSource
(contribution idFallback
) so we guarantee there's always anObjectMapper
provided for any type.static void
contributeOpenApiTypeDescriber(OrderedConfiguration<OpenApiTypeDescriber> configuration)
ContributesJacksonOpenApiTypeDescriber
to theOpenApiTypeDescriber
service to generate J.
-
-
-
Constructor Detail
-
RestJacksonModule
public RestJacksonModule()
-
-
Method Detail
-
contributeObjectMapperSource
public static void contributeObjectMapperSource(OrderedConfiguration<ObjectMapperSource> configuration)
ContributesFallbackObjectMapperSource
(contribution idFallback
) so we guarantee there's always anObjectMapper
provided for any type.
-
contributeComponentEventResultProcessor
public static void contributeComponentEventResultProcessor(MappedConfiguration<java.lang.Class,ComponentEventResultProcessor> configuration, MappedEntityManager mappedEntityManager, Response response, ObjectMapperSource objectMapperSource, @Symbol("tapestry.charset") java.lang.String outputEncoding)
Adds a (entity class, JacksonComponentEventResultProcessor) for each entity class returned byMappedEntityManager.getEntities()
.
-
contributeHttpRequestBodyConverter
public static void contributeHttpRequestBodyConverter(OrderedConfiguration<HttpRequestBodyConverter> configuration)
ContributesJacksonHttpRequestBodyConverter
to theHttpRequestBodyConverter
service.
-
buildObjectMapperSource
public static ObjectMapperSource buildObjectMapperSource(java.util.List<ObjectMapperSource> configuration, ChainBuilder chainBuilder)
Builds theObjectMapperSource
service.
-
buildSchemaGenerator
public static com.github.victools.jsonschema.generator.SchemaGenerator buildSchemaGenerator()
Provides the defaultSchemaGenerator
instance with a default configuration.
-
contributeOpenApiTypeDescriber
public static void contributeOpenApiTypeDescriber(OrderedConfiguration<OpenApiTypeDescriber> configuration)
ContributesJacksonOpenApiTypeDescriber
to theOpenApiTypeDescriber
service to generate J.
-
-