T - the generic type for the items of the returned Collectionpublic final class CollectionValueResolver<T> extends Object implements ValueResolver<Collection<T>>, org.mule.runtime.api.lifecycle.Initialisable
ValueResolver that takes a list of ValueResolvers and upon invocation
of resolve(ValueResolvingContext) it return a Collection of values with the outcome
of each original resolver.
This class implements Lifecycle and propagates those events to each of the resolvers| Constructor and Description |
|---|
CollectionValueResolver(Class<? extends Collection> collectionType,
List<ValueResolver<T>> resolvers)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
initialise() |
boolean |
isDynamic()
Returns
false if subsequent invocations to ValueResolver.resolve(ValueResolvingContext) will return the same value. |
static <T> CollectionValueResolver<T> |
of(Class<? extends Collection> collectionType,
List<ValueResolver<T>> resolvers) |
Collection<T> |
resolve(ValueResolvingContext context)
Passes the given
event to each resolvers and outputs a collection of type collectionType with each result |
public CollectionValueResolver(Class<? extends Collection> collectionType, List<ValueResolver<T>> resolvers)
collectionType - the Class for a concrete Collection type with a default constructorresolvers - a not null List of resolverspublic static <T> CollectionValueResolver<T> of(Class<? extends Collection> collectionType, List<ValueResolver<T>> resolvers)
public Collection<T> resolve(ValueResolvingContext context) throws org.mule.runtime.api.exception.MuleException
event to each resolvers and outputs a collection of type collectionType with each resultresolve in interface ValueResolver<Collection<T>>context - a ValueResolvingContext the context used for evaluationCollection of type collectionTypeorg.mule.runtime.api.exception.MuleExceptionpublic boolean isDynamic()
ValueResolverfalse if subsequent invocations to ValueResolver.resolve(ValueResolvingContext) will return the same value.
Notice that if it returns true, then it might return different values per invocation but that's not guaranteed.isDynamic in interface ValueResolver<Collection<T>>true if at least one of the resolvers are dynamicpublic void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionCopyright © 2003–2024 MuleSoft, Inc.. All rights reserved.