public class HalFormsConfiguration extends Object
HalConfiguration.| Constructor and Description |
|---|
HalFormsConfiguration()
Creates a new
HalFormsConfiguration backed by a default HalConfiguration. |
HalFormsConfiguration(HalConfiguration halConfiguration)
Creates a new
HalFormsConfiguration for the given HalConfiguration. |
| Modifier and Type | Method and Description |
|---|---|
HalFormsConfiguration |
customize(com.fasterxml.jackson.databind.ObjectMapper mapper)
Customizes the given
ObjectMapper with the registered callback. |
HalConfiguration |
getHalConfiguration()
Returns the underlying
HalConfiguration. |
HalFormsConfiguration |
registerPattern(Class<?> type,
String pattern)
Deprecated.
prefer
withPattern(Class, String) that returns a fresh instance, to be removed with 1.3. |
HalFormsConfiguration |
withObjectMapperCustomizer(Consumer<com.fasterxml.jackson.databind.ObjectMapper> objectMapperCustomizer)
Register the given
Consumer to apply additional customizations on the ObjectMapper used to render
HAL documents. |
<T> HalFormsConfiguration |
withOptions(Class<T> type,
String property,
Function<AffordanceModel.PropertyMetadata,HalFormsOptions> creator)
Returns a new
HalFormsConfiguration with the given |
HalFormsConfiguration |
withPattern(Class<?> type,
String pattern)
Registers a regular expression pattern to be used for form descriptions of the given type.
|
public HalFormsConfiguration()
HalFormsConfiguration backed by a default HalConfiguration.public HalFormsConfiguration(HalConfiguration halConfiguration)
HalFormsConfiguration for the given HalConfiguration.halConfiguration - must not be null.@Deprecated public HalFormsConfiguration registerPattern(Class<?> type, String pattern)
withPattern(Class, String) that returns a fresh instance, to be removed with 1.3.type - must not be null.pattern - must not be null or empty.public HalFormsConfiguration withPattern(Class<?> type, String pattern)
type - must not be null.pattern - must not be null or empty.public HalFormsConfiguration withObjectMapperCustomizer(Consumer<com.fasterxml.jackson.databind.ObjectMapper> objectMapperCustomizer)
Consumer to apply additional customizations on the ObjectMapper used to render
HAL documents.objectMapperCustomizer - must not be null.public HalFormsConfiguration customize(com.fasterxml.jackson.databind.ObjectMapper mapper)
ObjectMapper with the registered callback.mapper - must not be null.withObjectMapperCustomizer(Consumer)public <T> HalFormsConfiguration withOptions(Class<T> type, String property, Function<AffordanceModel.PropertyMetadata,HalFormsOptions> creator)
HalFormsConfiguration with the givenT - type - theproperty - creator - public HalConfiguration getHalConfiguration()
HalConfiguration.Copyright © 2011–2021 Pivotal, Inc.. All rights reserved.