T
- the decorated definition typepublic class DefinitionProviderWrapperWithProxyFallback<T> extends DefinitionProviderWrapper<T>
get()
method implementation in such a way that it's result uses a 'decorated super-result' as a
safety net for unsuccessful method calls.Modifier and Type | Class and Description |
---|---|
static class |
DefinitionProviderWrapperWithProxyFallback.DirectDelegator
Merely delegates to the bean coming from the wrapped definition provider.
|
static class |
DefinitionProviderWrapperWithProxyFallback.FallbackInterceptor
Delegates to the bean coming from the wrapped definition provider or to the fallback definition in case the return value is null.
|
static interface |
DefinitionProviderWrapperWithProxyFallback.WithDelegate<T>
Allows to set a main delegate for the wrapper (decorated definition).
|
static interface |
DefinitionProviderWrapperWithProxyFallback.WithFallback<T>
Allows to set a fallback for the decorated definition method invocations.
|
DefinitionProvider.Problem
Modifier and Type | Field and Description |
---|---|
static String |
DELEGATE_FIELD_NAME |
static String |
FALLBACK_FIELD_NAME |
Constructor and Description |
---|
DefinitionProviderWrapperWithProxyFallback(DefinitionProvider<T> delegate,
T fallbackDefinition) |
Modifier and Type | Method and Description |
---|---|
protected T |
doGet() |
T |
get()
Returns the underlying bean if and only if it is successfully resolved, is valid, and is enabled.
|
getDelegate
getDecorators, getErrorMessages, getLastModified, getMetadata, getProblems, getRaw, isValid
public static final String FALLBACK_FIELD_NAME
public static final String DELEGATE_FIELD_NAME
public DefinitionProviderWrapperWithProxyFallback(DefinitionProvider<T> delegate, T fallbackDefinition)
public final T get()
DefinitionProvider
get
in interface DefinitionProvider<T>
get
in class AbstractDefinitionProviderWrapper<T>
protected T doGet()
Copyright © 2003–2021 Magnolia International Ltd.. All rights reserved.