|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.sdm.quasar.client.core.dialog.impl.DefaultDialogControl
Default implementation of DialogControl.
| Method Summary | |
void |
attachToLifeCycle(LifeCycle lifeCycle)
Attaches a component that is interested in the life cycle of this dialog to the notification chain. |
boolean |
canCreateSubDialog(java.lang.String dialogId)
Tests, whether the dialog with the given id can be created as subdialog. |
SubDialogControl |
createSubDialog(java.lang.String dialogId,
java.lang.Object context)
Creates a new dialog that is dependent on this dialog. |
void |
detachFromLifeCycle(LifeCycle lifeCycle)
Detaches a component from the life cycle notification. |
Service |
findServiceInHierarchy(java.lang.Class service)
Returns the first implementation of a desired service in the hierarchy of the node. |
Service |
findServiceInParentHierarchy(java.lang.Class service)
Returns the first implementation of a desired service in the hierarchy of the parent node. |
java.lang.Object |
getCreationContext()
Returns the creation context passed by the dialog instance creation of this dialog instance. |
DialogInstanceId |
getDialogInstanceId()
|
Feature |
getFeature(java.lang.Class keyClass)
Returns the Feature associated with the given key class. |
LifeCycleState |
getLifeCycleState()
|
Service |
getServiceDirect(ID id,
java.lang.Class service)
Returns the implementation of a desired service registered at the node with the given id. |
boolean |
hasFeature(java.lang.Class keyClass)
Returns true, if a Feature is registered under the
given key class. |
boolean |
hasServiceDirect(ID id,
java.lang.Class service)
Tests whether a specific node offers a service. |
boolean |
hasServiceInHierarchy(java.lang.Class service)
Tests if a service exists in the hierarchy of the node. |
boolean |
hasServiceInParentHierarchy(java.lang.Class service)
Tests if a service exists in the hierarchy of the parent node. |
boolean |
hasSubDialog(SubDialogControl subDialogControl)
Returns true, if the SubDialogControl given is a
valid sub dialog of this DialogControl (created via
createSubDialog(String, Object)), that is currently not
disposed. |
Feature |
installFeature(java.lang.Class featureClass)
Installs an instance of the specified feature class. |
Feature |
installFeature(java.lang.Class keyClass,
java.lang.Class featureClass)
Installs an instance of the specified feature class under the given key class. |
Feature |
installFeature(java.lang.Class keyClass,
Feature feature)
Installs the specified feature under the given key class. |
Feature |
installFeature(Feature feature)
Installs the specified feature. |
void |
registerService(java.lang.Class service,
Service implementation)
Registers a service for this node. |
void |
registerServiceForHierarchy(java.lang.Class service,
Service implementation)
Registers a service for this node for hierarchical use only. |
Feature |
requireFeature(java.lang.Class featureClass)
Returns the feature associated with the given key class; if no such feature was registered before, a new instance of the given class will created and installed as Feature for it's concrete class
as feature key class. |
Feature |
uninstallFeature(Feature feature)
Uninstalls the specified feature instance. |
void |
unregisterService(java.lang.Class service,
Service implementation)
Unregisters a service for this node. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public SubDialogControl createSubDialog(java.lang.String dialogId,
java.lang.Object context)
DialogControl
createSubDialog in interface DialogControldialogId - the dialog id of the new dialogcontext - the initialization context of the new dialog
com.sdm.quasar.client.comp.dlgdef.lifecyclectrl.DialogControl#createSubDialog(java.lang.String, java.lang.Object)public boolean hasSubDialog(SubDialogControl subDialogControl)
DialogControltrue, if the SubDialogControl given is a
valid sub dialog of this DialogControl (created via
DialogControl.createSubDialog(String, Object)), that is currently not
disposed.
hasSubDialog in interface DialogControlsubDialogControl - the SubDialogControl to check
true, if the SubDialogControl is created
by this DialogControl andDialogControl.hasSubDialog(com.sdm.quasar.client.core.dialog.SubDialogControl)public boolean canCreateSubDialog(java.lang.String dialogId)
DialogControl
canCreateSubDialog in interface DialogControldialogId - Id of the dialog to be created
com.sdm.quasar.client.comp.dlgdef.lifecyclectrl.DialogControl#canCreateSubDialog(java.lang.String, java.lang.Object)public DialogInstanceId getDialogInstanceId()
getDialogInstanceId in interface DialogControlDialogControl.getDialogInstanceId()public java.lang.Object getCreationContext()
DialogControl
getCreationContext in interface DialogControlDialogControl.getCreationContext()public void attachToLifeCycle(LifeCycle lifeCycle)
LifeCycleControlLifeCycle implementations will be notified
of lifecycle changes in the order they have been registered for calls to
LifeCycle.prepare() and LifeCycle.activate() and in
reverse order for LifeCycle.deactivate() and LifeCycle.release().
attachToLifeCycle in interface LifeCycleControllifeCycle - the life cycle to be notifiedLifeCycleControl.attachToLifeCycle(LifeCycle)public void detachFromLifeCycle(LifeCycle lifeCycle)
LifeCycleControl
detachFromLifeCycle in interface LifeCycleControllifeCycle - the life cycle that should not be notified any moreLifeCycleControl.detachFromLifeCycle(LifeCycle)public LifeCycleState getLifeCycleState()
getLifeCycleState in interface LifeCycleStateProviderLifeCycleStateProvider.getLifeCycleState()public Service findServiceInHierarchy(java.lang.Class service)
DialogServiceAccess
findServiceInHierarchy in interface DialogServiceAccessservice - the class of the service interface that is searched for
com.sdm.quasar.client.comp.dlgdef.DialogServiceAccess#findServiceInHierarchy(java.lang.Class)public Service findServiceInParentHierarchy(java.lang.Class service)
DialogServiceAccess
findServiceInParentHierarchy in interface DialogServiceAccessservice - the class of the service interface that is searched for
DialogServiceAccess.findServiceInParentHierarchy(java.lang.Class)public boolean hasServiceInHierarchy(java.lang.Class service)
DialogServiceAccess
hasServiceInHierarchy in interface DialogServiceAccessservice - the class of the service interface that is searched for
com.sdm.quasar.client.comp.dlgdef.DialogServiceAccess#hasServiceInHierarchy(java.lang.Class)public boolean hasServiceInParentHierarchy(java.lang.Class service)
DialogServiceAccess
hasServiceInParentHierarchy in interface DialogServiceAccessservice - the class of the service interface that is searched for
DialogServiceAccess.hasServiceInParentHierarchy(java.lang.Class)
public void registerService(java.lang.Class service,
Service implementation)
DialogServiceAccessService,
and the implementation implement that interface.
If there is already an implementation registered for that service, that implementation is replaced by the passed as a parameter.
Please note that a a registered service should be unregistered when the life cycle of the provider ends.
registerService in interface DialogServiceAccessservice - the interface that defines the serviceimplementation - the implementation of the servicecom.sdm.quasar.client.comp.dlgdef.DialogServiceAccess#registerService(java.lang.Class, com.sdm.quasar.client.core.common.services.Service)
public void registerServiceForHierarchy(java.lang.Class service,
Service implementation)
DialogServiceAccessDialogServiceAccess.getServiceDirect(ID, Class); it will be found
only via DialogServiceAccess.findServiceInHierarchy(Class).
Please note, that a service interface can eighter be registered for hierarchical
use (this method) or for direct and hierarchical use
(see #registerService(ID, Class, Service)).
The last registration overwrites the previous; it is not possible to
register two different implementations: one for hierarchical and one for direct
use!
The service class must be an interface that extend Service,
and the implementation implement that interface.
Please note that a a registered service should be unregistered when the life cycle of the provider ends.
registerServiceForHierarchy in interface DialogServiceAccessservice - the interface that defines the serviceimplementation - the implementation of the serviceDialogServiceAccess.registerServiceForHierarchy(java.lang.Class, com.sdm.quasar.client.core.common.services.Service)
public void unregisterService(java.lang.Class service,
Service implementation)
DialogServiceAccessIf the service is not registered for this node or the given implementation is not the one that is registered, nothing happens.
Therefore, if a service implementation is replaced by another implementation, the unregistering of the first implementation is harmless since the second implementation will stay registered. However, if the second implementation is unregistered first, then no service will be available, even though the first service implementation hasn't been unregistered yet.
unregisterService in interface DialogServiceAccessservice - the interface that defines the serviceimplementation - the registered implementation of the servicecom.sdm.quasar.client.comp.dlgdef.DialogServiceAccess#unregisterService(java.lang.Class, com.sdm.quasar.client.core.common.services.Service)
public Service getServiceDirect(ID id,
java.lang.Class service)
DialogServiceAccess
getServiceDirect in interface DialogServiceAccessid - the id of the nodeservice - the class of the service interface that is requested
DialogServiceAccess.getServiceDirect(com.sdm.quasar.client.core.common.ID, java.lang.Class)
public boolean hasServiceDirect(ID id,
java.lang.Class service)
DialogServiceAccess
hasServiceDirect in interface DialogServiceAccessid - the id of the nodeservice - the class of the service interface that is searched for
DialogServiceAccess.hasServiceDirect(com.sdm.quasar.client.core.common.ID, java.lang.Class)public boolean hasFeature(java.lang.Class keyClass)
FeatureManagertrue, if a Feature is registered under the
given key class.
hasFeature in interface FeatureManagerkeyClass - the key class to check containment forFeatureManager.hasFeature(java.lang.Class)public Feature getFeature(java.lang.Class keyClass)
FeatureManagerFeature associated with the given key class.
getFeature in interface FeatureManagerkeyClass - the key class to get a Feature for
Feature instanceFeatureManager.getFeature(java.lang.Class)public Feature requireFeature(java.lang.Class featureClass)
FeatureManagerFeature for it's concrete class
as feature key class.
requireFeature in interface FeatureManagerfeatureClass - the key and concrete feature class
Feature associated with the given key class.FeatureManager.requireFeature(java.lang.Class)public Feature installFeature(Feature feature)
FeatureManagerFeature cannote be accessed by
a key class, so therefore FeatureManager.installFeature(Class, Feature) should
be called.
installFeature in interface FeatureManagerfeature - the feature instance to be installed
Feature instance (the same than the parameter)FeatureManager.installFeature(Feature)
public Feature installFeature(java.lang.Class keyClass,
Feature feature)
FeatureManagerNote: There must no feature installed with the given key class before, otherwise an assertion will be thrown.
installFeature in interface FeatureManagerkeyClass - the key class to refer to the featurefeature - the feature instance to be installed
Feature instance (the same than the parameter)FeatureManager.installFeature(Class, Feature)public Feature installFeature(java.lang.Class featureClass)
FeatureManagerFeatureManager.installFeature(Class, Class).
The FeatureManager tries to create the feature instance using
the registered FeatureCreator's. It is assumed, that the
most specific FeatureCreator is added last.
installFeature in interface FeatureManagerfeatureClass - the feature class to install an instance of
Feature instanceFeatureManager.installFeature(java.lang.Class)
public Feature installFeature(java.lang.Class keyClass,
java.lang.Class featureClass)
FeatureManagerFeatureManager tries to create the feature instance using
the registered FeatureCreator's. It is assumed, that the
most specific FeatureCreator is added last.
The given feature class must be a subclass of the key class given.
Note: There must no feature installed with the given key class before, otherwise an assertion will be thrown.
installFeature in interface FeatureManagerkeyClass - the key class to refer to the feature (if null, the
feature instance will be installed, but no mapping will be made)featureClass - the feature class to install an instance of
Feature instanceFeatureManager.installFeature(java.lang.Class, java.lang.Class)public Feature uninstallFeature(Feature feature)
FeatureManager
uninstallFeature in interface FeatureManagerfeature - the feature instance to be uninstalled
Feature instanceFeatureManager.uninstallFeature(Feature)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||