T - the generic type of the produced values.public final class ConfigOverrideValueResolverWrapper<T> extends Object implements ValueResolver<T>, org.mule.runtime.api.lifecycle.Initialisable
ValueResolver wrapper which defaults to obtaining the value from the current ConfigurationInstance if the
given delegate results in a null value.| 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> ValueResolver<T> |
of(ValueResolver<T> delegate,
String parameterName,
Class<?> parameterType,
ReflectionCache reflectionCache,
MuleContext muleContext,
String paramOwner)
Creates a new instance
|
static <T> ValueResolver<T> |
of(ValueResolver<T> delegate,
String parameterName,
org.mule.metadata.api.model.MetadataType parameterType,
ReflectionCache reflectionCache,
MuleContext muleContext,
String paramOwner)
Creates a new instance
|
T |
resolve(ValueResolvingContext context)
Resolves a value from the given
event |
T |
resolveWithoutConfig(ValueResolvingContext context) |
public static <T> ValueResolver<T> of(ValueResolver<T> delegate, String parameterName, Class<?> parameterType, ReflectionCache reflectionCache, MuleContext muleContext, String paramOwner)
T - the generic type of the produced values.delegate - the delegate used to obtain a value in the first place. Only if this
delegate returns a null value will the resolution using a config will be attempted.reflectionCache - the cache for expensive reflection lookupsConfigOverrideValueResolverWrapperpublic static <T> ValueResolver<T> of(ValueResolver<T> delegate, String parameterName, org.mule.metadata.api.model.MetadataType parameterType, ReflectionCache reflectionCache, MuleContext muleContext, String paramOwner)
T - the generic type of the produced values.delegate - the delegate used to obtain a value in the first place. Only if this
delegate returns a null value will the resolution using a config will be attempted.reflectionCache - the cache for expensive reflection lookupsConfigOverrideValueResolverWrapperpublic T resolve(ValueResolvingContext context) throws org.mule.runtime.api.exception.MuleException
ValueResolvereventresolve in interface ValueResolver<T>context - the context for the current resolution attemptorg.mule.runtime.api.exception.MuleException - if the resolution of the value failspublic T resolveWithoutConfig(ValueResolvingContext context) throws org.mule.runtime.api.exception.MuleException
org.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<T>public 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.