Class SpelPropertyAccessorRegistrar
java.lang.Object
org.springframework.integration.expression.SpelPropertyAccessorRegistrar
Utility class that keeps track of a Set of SpEL
PropertyAccessor
s
in order to register them with the "integrationEvaluationContext" upon initialization.
Accessors must be added before context refresh.- Since:
- 3.0
- Author:
- Artem Bilan, Gary Russell
-
Constructor Summary
ConstructorDescriptionSpelPropertyAccessorRegistrar
(Map<String, PropertyAccessor> propertyAccessors) Create an instance with the provided namedPropertyAccessor
instances.SpelPropertyAccessorRegistrar
(PropertyAccessor... propertyAccessors) Create an instance with the providedPropertyAccessor
instances. -
Method Summary
Modifier and TypeMethodDescriptionadd
(String name, IndexAccessor indexAccessor) Add the provided namedIndexAccessor
.add
(String name, PropertyAccessor propertyAccessor) Add the provided named property accessor.add
(IndexAccessor... indexAccessors) Add the providedIndexAccessor
instances.add
(PropertyAccessor... propertyAccessors) Add the provided property accessors.Return the registeredIndexAccessor
instances.Return the registeredPropertyAccessor
instances to use in the targetEvaluationContext
.void
setIndexAccessors
(Map<String, IndexAccessor> indexAccessors) Add a map ofIndexAccessor
instances to use in the targetEvaluationContext
.
-
Constructor Details
-
SpelPropertyAccessorRegistrar
public SpelPropertyAccessorRegistrar() -
SpelPropertyAccessorRegistrar
Create an instance with the providedPropertyAccessor
instances. Each accessor name will be the class simple name.- Parameters:
propertyAccessors
- the accessors.- Since:
- 4.3.8
-
SpelPropertyAccessorRegistrar
Create an instance with the provided namedPropertyAccessor
instances.- Parameters:
propertyAccessors
- a map of name:accessor.- Since:
- 4.3.8
-
-
Method Details
-
getPropertyAccessors
Return the registeredPropertyAccessor
instances to use in the targetEvaluationContext
.- Returns:
- the map of name:accessor.
- Since:
- 4.3.8
-
setIndexAccessors
Add a map ofIndexAccessor
instances to use in the targetEvaluationContext
.- Parameters:
indexAccessors
- the map of name:accessor.- Since:
- 6.4
-
getIndexAccessors
Return the registeredIndexAccessor
instances.- Returns:
- the map of name:accessor.
- Since:
- 6.4
-
add
Add the provided named property accessor.- Parameters:
name
- the name.propertyAccessor
- the accessor.- Returns:
- this registrar.
- Since:
- 4.3.8
-
add
Add the provided property accessors. Each accessor name will be the class simple name.- Parameters:
propertyAccessors
- the accessors.- Returns:
- this registrar.
- Since:
- 4.3.8
-
add
Add the provided namedIndexAccessor
.- Parameters:
name
- the name.indexAccessor
- the accessor.- Returns:
- this registrar.
- Since:
- 6.4
-
add
Add the providedIndexAccessor
instances. Each accessor name will be the class simple name.- Parameters:
indexAccessors
- the accessors.- Returns:
- this registrar.
- Since:
- 6.4
-