Interface FacadeHandlerContext
- All Known Implementing Classes:
FacadeHandlerContextImpl
public interface FacadeHandlerContext
The context for when creating component facades out of components, before marshalling the
facades to the client.
Not a service.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the current component, which in fact is just the one you expect, because you already have told the system within the method.<T extends Component>
TgetComponent
(Class<T> clazz) Type-safe equivalent to thegetComponent()
method<F extends ComponentFacade>
FgetCurrentFacade
(Class<F> clazz) SeegetParentFacade()
.@Nullable ComponentFacade
Get the parent facade.@Nullable String
Get the current path identifiert.
-
Method Details
-
getFormScope
String getFormScope() -
getTextResources
TextResources getTextResources() -
getParentFacade
Get the parent facade. When we need it, we can extend theComponentFacade
interface so we can browse the already constructed structure a bit better. But in some cases (eg. the table column) we know exacly what the parent must be and thus we can cast or usegetCurrentFacade(Class)
to retrieve facade.- Returns:
- the parent facade
-
getPathIdentifier
Get the current path identifiert. eg. 'firstname', 'relPrincipal', 'Address' ...- Returns:
- The identifier, or null if it's not a data component.
-
getCurrentFacade
SeegetParentFacade()
. Additional possibility to move the cast into the context.- Type Parameters:
F
- the type in which we expect the facade to be- Parameters:
clazz
- the class in which we expect the facade to be- Returns:
- the facade in the specific type
-
getComponent
Component getComponent()Returns the current component, which in fact is just the one you expect, because you already have told the system within the method. UsegetComponent(Class)
when you don't want to cast. This is save because you know the type.- Returns:
- the current component
-
getComponent
Type-safe equivalent to thegetComponent()
method- Type Parameters:
T
- the type- Parameters:
clazz
- the class- Returns:
- the component casted to passed type
-