@Target(value={PARAMETER,FIELD}) @Retention(value=RUNTIME) @Repeatable(value=FieldsValues.class) @Documented @MinMuleVersion(value="4.4") public @interface FieldValues
values resolved. This
resolution is resolved by the ValueProvider referenced in value().| Modifier and Type | Required Element and Description |
|---|---|
String[] |
targetSelectors
Gets the target selectors of the fields of the parameter whose values are resolved by the
ValueProvider referenced in
value(). |
Class<? extends ValueProvider> |
value |
public abstract String[] targetSelectors
ValueProvider referenced in
value().
The following is an example of a possible value for the parameter so that the type of the parameter is understood:
{
"routingInfo": {
"channelId":"CHANNEL_ID_VALUE",
"region":"SOUTH"
},
"message":"The message to send"
}
Using the DataWeave syntax, the target selector for the "channelId" field will be "routingInfo.channelId". In this case, the
format of the target selector is the name of the fields to access separated by a dot (`.`).
The following is another example using XML where the target is an attribute:
<customers>
<person gender="male"/>
<name>John</name>
<occupation>Banker</occupation>
</person>
</customers>
Using the DataWeave syntax the gender attribute target selector will be "customers.person.@gender".
When the given ValueProvider referenced in value() is a single level provider, the returned array
will have only one target selector. If it is multi-level, the returned array will have the selectors of the value parts in
order they are resolved.
The following is an example of a possible value for the parameter so that the type of the parameter is understood:
{
"name" : "John",
"occupation" : "Banker",
"location": {
"continent": "CONTINENT",
"country": "COUNTRY",
"city": "CITY"
}
}
If a multi-level value provider is defined for the fields continent, country and city, the array returned must be ["location.continent", "location.country", "location.city"]
All the values must be in the same parameter for multi-level resolution.
public abstract Class<? extends ValueProvider> value
ValueProvider for the parameterpublic abstract boolean open
public abstract Binding[] bindings
OfValues.value() to extraction expressions.Copyright © 2022. All rights reserved.