public class UiContextBoundComponentProvider extends Object implements info.magnolia.objectfactory.ComponentProvider, Serializable
ComponentProvider
implementation for UI components which conducts provisioning
by delegating it to the only UI Guice instance via a GuiceComponentProvider
associated with it.
The only significant function of such component provider
is that it
is bound to a certain UI context via UiContextReference
which is pushed into CurrentUiContextReference
before any Guice invocation. By doing this Guice knows (when uncertain) what flavour of components to inject.
UiAnnotations
,
UiContextApplyingProvider
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
UiContextBoundComponentProvider.Builder |
Constructor and Description |
---|
UiContextBoundComponentProvider(UiContextReference uiContextReference) |
UiContextBoundComponentProvider(UiContextReference uiContextReference,
info.magnolia.objectfactory.guice.GuiceComponentProvider parentComponentProvider) |
UiContextBoundComponentProvider(UiContextReference uiContextReference,
info.magnolia.objectfactory.guice.GuiceComponentProvider parentComponentProvider,
CurrentUiContextReference currentUiContextReference) |
Modifier and Type | Method and Description |
---|---|
static UiContextBoundComponentProvider.Builder |
builder(String name,
UiContextReference parentReference) |
<T> T |
getComponent(Class<T> type) |
<T> Class<? extends T> |
getImplementation(Class<T> type) |
info.magnolia.objectfactory.guice.GuiceComponentProvider |
getParent() |
protected Stream<UiContextReference> |
getReachableUiContextReferences() |
<T> T |
getSingleton(Class<T> type) |
UiContextReference |
getUiContextReference() |
UiContextBoundComponentProvider |
inChildContext(info.magnolia.config.NamedDefinition definition) |
UiContextBoundComponentProvider |
inChildContext(String name,
Object definition) |
<T> T |
newInstance(Class<T> type,
Object... parameters) |
<T> T |
newInstanceWithParameterResolvers(Class<T> type,
info.magnolia.objectfactory.ParameterResolver... parameters) |
@Inject public UiContextBoundComponentProvider(UiContextReference uiContextReference)
public UiContextBoundComponentProvider(UiContextReference uiContextReference, info.magnolia.objectfactory.guice.GuiceComponentProvider parentComponentProvider)
public UiContextBoundComponentProvider(UiContextReference uiContextReference, info.magnolia.objectfactory.guice.GuiceComponentProvider parentComponentProvider, CurrentUiContextReference currentUiContextReference)
public UiContextReference getUiContextReference()
public <T> Class<? extends T> getImplementation(Class<T> type)
getImplementation
in interface info.magnolia.objectfactory.ComponentProvider
protected Stream<UiContextReference> getReachableUiContextReferences()
public <T> T getSingleton(Class<T> type)
getSingleton
in interface info.magnolia.objectfactory.ComponentProvider
public <T> T getComponent(Class<T> type)
getComponent
in interface info.magnolia.objectfactory.ComponentProvider
public <T> T newInstance(Class<T> type, Object... parameters)
newInstance
in interface info.magnolia.objectfactory.ComponentProvider
public <T> T newInstanceWithParameterResolvers(Class<T> type, info.magnolia.objectfactory.ParameterResolver... parameters)
newInstanceWithParameterResolvers
in interface info.magnolia.objectfactory.ComponentProvider
public info.magnolia.objectfactory.guice.GuiceComponentProvider getParent()
getParent
in interface info.magnolia.objectfactory.ComponentProvider
public UiContextBoundComponentProvider inChildContext(String name, Object definition)
public UiContextBoundComponentProvider inChildContext(info.magnolia.config.NamedDefinition definition)
public static UiContextBoundComponentProvider.Builder builder(String name, UiContextReference parentReference)
Copyright © 2019 Magnolia International Ltd.. All rights reserved.