|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Feature is an (almost) tagging interface for the user-written or
reused parts of a dialog.
Why using Features? It is not necessary to use features
together with DialogControl, but we force users to do so.
The advantages of Features are:
Feature is an element of reuse for dialog parts: A
Feature always has the same access to the dialog environment
than the rest of the dialog has (via DialogControl). Additionally
they usually take part on the dialog lifecycle. So a concrete
Feature may be reused in another dialog and can act for it -
without a single change.Feature configuration is easy because they have access
to the FeatureManager (implemented by DialogControl) and so
may require, install or simply access other Features without
complicated set-up (like bulk dependency-injection-constructors). Because
users may pre-install overwritten Features, there is no
loss of flexibility.Features help to separate application layers and
functionalty without configuration afford. Simply put separated functionality
in different features. The access to each other can be done by accessing
them using FeatureManager.
To be able to use the dialog environment, the Feature implementations
should have access to the DialogControl. The DialogControl can
be passed using dependency injection (e.g. calling the constructor), but may
also beeing passed using attachDialogControl(DialogControl).
Note: If a DialogControl was passed via constructor, Feature
must be installed to the same DialogControl, so that attachDialogControl(DialogControl)
is called with the same DialogControl instance. Without calling
attachDialogControl(DialogControl), the Feature will not be attached to the
dialog lifecycle.
| Method Summary | |
void |
attachDialogControl(DialogControl dialogControl)
Attaches the lifecycle of the Feature to the lifecycle of
the DialogControl given. |
void |
disposeFeature()
Detaches the lifecycle of the Feature from the lifecycle of
the DialogControl previouse given and disposes the feature.
|
| Method Detail |
public void attachDialogControl(DialogControl dialogControl)
Feature to the lifecycle of
the DialogControl given. The feature must not be attached twice.
Note: This method has to be called after the feature was completely created.
public void disposeFeature()
Feature from the lifecycle of
the DialogControl previouse given and disposes the feature.
After calling this method must not be used again.
Also attaching to a DialogControl is forbidden after calling this method.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||