Top Description Constructors Methods
org.springframework.validation.support

public Class BindingAwareConcurrentModel

extends ConcurrentModel
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.util.Map, org.springframework.lang.Nullable, org.springframework.ui.ConcurrentModel, org.springframework.validation.BindingResult

Subclass of ConcurrentModel that automatically removes the BindingResult object when its corresponding target attribute is replaced through regular Map operations.

This is the class exposed to handler methods by Spring WebFlux, typically consumed through a declaration of the org.springframework.ui.Model interface as a parameter type. There is typically no need to create it within user code. If necessary a handler method can return a regular java.util.Map, likely a java.util.ConcurrentMap, for a pre-determined model.

Author
Rossen Stoyanchev
Since
5.0
See Also
BindingResult, BindingAwareModelMap

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
put(String
key with which the specified value is to be associated
key
,
Object
value to be associated with the specified key
value
)

Overrides org.springframework.ui.ConcurrentModel.put.

Implements java.util.Map.put.

Maps the specified key to the specified value in this table.
private void
Inherited from org.springframework.ui.ConcurrentModel:
addAllAttributesaddAllAttributesaddAttributeaddAttributeasMapcontainsAttributegetAttributemergeAttributesputAll

Constructor Detail

BindingAwareConcurrentModelback to summary
public BindingAwareConcurrentModel()

Method Detail

putback to summary
public Object put(String key, Object value)

Overrides org.springframework.ui.ConcurrentModel.put.

Implements java.util.Map.put.

Doc from java.util.concurrent.ConcurrentHashMap.put.

Maps the specified key to the specified value in this table. Neither the key nor the value can be null.

The value can be retrieved by calling the get method with a key that is equal to the original key.

Parameters
key:String

key with which the specified value is to be associated

value:Object

value to be associated with the specified key

Returns:Object

the previous value associated with key, or null if there was no mapping for key

Annotations
@Override
@Nullable
removeBindingResultIfNecessaryback to summary
private void removeBindingResultIfNecessary(String key, Object value)