T - widget model typeU - widget controller typepublic interface WidgetAdapter<T extends WidgetModel,U extends WidgetController> extends CockpitEventAcceptor
WidgetAdapter typically ties a WidgetController and a WidgetModel together.
Widget adapters are registered as event subscribers with a WidgetController. When a WidgetEvent is
published, the adapter contains the logic to determine how a widget's model should be updated
i.e. it "translates" the event into concrete model method calls.WidgetController,
WidgetModel,
WidgetConfig| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getControllerCtx()
Returns the widget controller context code.
|
U |
getWidgetController()
Returns the widget controller.
|
T |
getWidgetModel()
Returns the widget model.
|
boolean |
isAutoControllerEnabled()
Returns whether this adapter allows
WidgetController to be set automatically. |
void |
setAutoControllerEnabled(boolean autoController)
Sets whether this adapter allows the
WidgetController to be set automatically. |
void |
setControllerCtx(java.lang.String ctx)
Sets the widget controller context code to
ctx. |
void |
setWidgetController(U controller)
Sets the widget controller to
controller. |
void |
setWidgetModel(T model)
Sets the widget model to
model. |
onCockpitEventvoid setWidgetModel(T model)
model.model - widget modelT getWidgetModel()
void setWidgetController(U controller)
controller.controller - the widget controllerU getWidgetController()
void setControllerCtx(java.lang.String ctx)
ctx.ctx - widget controller context codejava.lang.String getControllerCtx()
void setAutoControllerEnabled(boolean autoController)
WidgetController to be set automatically.autoController - true means enabled, false disabledboolean isAutoControllerEnabled()
WidgetController to be set automatically.Copyright © 2018 SAP SE. All Rights Reserved.