|
|||||||||||
| 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.DefaultDialogManager
A default implementation of DialogManager.
| Constructor Summary | |
DefaultDialogManager(ID rootId,
HierarchyManager hierarchyManager,
DialogServiceManager serviceManager)
Constructor. |
|
| Method Summary | |
void |
addLifeCycleListener(LifeCycleListener listener)
Registers an observer of the life cycle of dialogs. |
boolean |
canCreateDialog(java.lang.String dialogId)
Tests, whether the dialog with the given id can be created by this dialog manager. |
void |
collectSystemInfo(ID id,
SystemInfoNode root,
SystemInfoOptions options)
Builds the system information tree upon local information of the implementor about the dialog with the ID given. |
DialogInstance |
createDialog(java.lang.String dialogId,
DialogInstanceId lifeCycleParentDiid,
java.lang.Object context)
Creates a dependent dialog. |
DialogInstance |
createRootDialog(DialogInstanceId rootDialogInstanceId,
java.lang.Object context)
Creates the root dialog instance. |
DialogInstanceId |
createRootDialogInstanceId()
Creates a root dialog id. |
void |
dispose()
Disposes the component. |
void |
disposeDialog(DialogInstanceId diid)
Disposes a dialog by calling com.sdm.quasar.client.comp.dlgdef.Dialog#dispose().
|
DialogExceptionHandler |
getDialogExceptionHandler()
|
LifeCycleState |
getLifeCycleState(ID id)
Returns a LifeCycleState for the given id. |
protected java.lang.String |
getNextInstanceId()
Returns the next instance-number to use for the specified dialog. |
boolean |
hasDialog(DialogInstanceId diid)
Tests, whether a dialog with a given instance id exists. |
void |
removeLifeCycleListener(LifeCycleListener listener)
Unregisters an observer of the life cycle of dialogs. |
protected DialogInstanceId |
reserveId(java.lang.String dialogId)
Reserves a DialogInstanceId for a dialog that will be created later
using
#createDialogInternal(DialogInstanceId, DialogServiceManager, Object).
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultDialogManager(ID rootId,
HierarchyManager hierarchyManager,
DialogServiceManager serviceManager)
rootId - the root id for independent dialogs (e.g. session id)hierarchyManager - the HierarchyManager for the dialog hierarchyserviceManager - the DialogServiceManager to register services| Method Detail |
public LifeCycleState getLifeCycleState(ID id)
DialogManagerLifeCycleState for the given id. If the id is a known
dialog instance id, the returned state is equal to the state of the acssociated
dialog instance. Additionally this method assures, that for any
other id given, a valid LifeCycleState is returned.
getLifeCycleState in interface DialogManagerid - the id to get a LifeCycleState for
LifeCycleState for the idDialogManager.getLifeCycleState(ID)public boolean canCreateDialog(java.lang.String dialogId)
DialogManager
canCreateDialog in interface DialogManagerdialogId - the id of the dialog
com.sdm.quasar.client.core.dialog.DialogManager#canCreateDialog(java.lang.String)public DialogInstanceId createRootDialogInstanceId()
DialogManager
Note: This is the first step in creating a root dialog node.
A call to #createRootDialog(DialogInstanceId, DialogServiceManager, Object)
should follow to finish creation of a root dialog.
createRootDialogInstanceId in interface DialogManagerDialogInstanceId for the root dialog, that will be
created later by calling #createRootDialog(DialogInstanceId, DialogServiceManager, Object).DialogManager.createRootDialogInstanceId()
public DialogInstance createRootDialog(DialogInstanceId rootDialogInstanceId,
java.lang.Object context)
throws DialogException
DialogManager
Note: This is the second step in creating a root dialog node.
The given rootDialogInstanceId must already exist.
To create a root id use #createRootDialogInstanceId(String)
in advance.
createRootDialog in interface DialogManagercontext - the dialog context object, used as initialization parameter by the dialog
DialogException - if the dialog could not be created due to an error in configuration or dialog implementation.DialogManager.createRootDialog(com.sdm.quasar.client.core.dialog.DialogInstanceId, java.lang.Object)
public DialogInstance createDialog(java.lang.String dialogId,
DialogInstanceId lifeCycleParentDiid,
java.lang.Object context)
throws DialogException
DialogManagerThe dialog will be disposed automatically before its parent dialog is disposed.
createDialog in interface DialogManagerdialogId - the id of the dialog to be createdlifeCycleParentDiid - the dialog instance id of the parentcontext - the dialog context object, used as initialization parameter by the dialog
DialogException - if the dialog could not be created
due to an error in configuration or dialog implementation.DialogManager.createDialog(java.lang.String, com.sdm.quasar.client.core.dialog.DialogInstanceId, java.lang.Object)public void disposeDialog(DialogInstanceId diid)
DialogManagercom.sdm.quasar.client.comp.dlgdef.Dialog#dispose().
Note: The implementation must not return before the dialog is disposed. Any threads or asynchronous calls started must be completed before this method returns.
disposeDialog in interface DialogManagerdiid - diid the dialog instance id of the dialog to be disposedcom.sdm.quasar.client.comp.dlgdef.mgmt.DialogManager#disposeDialog(com.sdm.quasar.client.comp.dlgdef.DialogInstanceId)public boolean hasDialog(DialogInstanceId diid)
DialogManager
hasDialog in interface DialogManagerdiid - diid the dialog instance id to be tested
com.sdm.quasar.client.comp.dlgdef.mgmt.DialogManager#hasDialog(com.sdm.quasar.client.comp.dlgdef.DialogInstanceId)
public void dispose()
throws DisposeException
Disposable
Important:
This method is called by an administrating component
and must never be called directly.
The implementation should release any resources or objects allocated and
any services registered. Furthermore, this method should be developed
carefully to free a maximum of resources even when the system may
have become unstable. In case of one or multiple errors, you should collect
them in a DisposeException, continue with the execution,
and throw it at the end of the method.
Note: The implementation must not return before the component is disposed. Any threads or asynchronous calls started must be completed before this method returns.
dispose in interface DisposableDisposeException - if there was one or more errors while
disposing the component.Disposable.dispose()public DialogExceptionHandler getDialogExceptionHandler()
DialogExceptionHandler usedprotected DialogInstanceId reserveId(java.lang.String dialogId)
DialogInstanceId for a dialog that will be created later
using
#createDialogInternal(DialogInstanceId, DialogServiceManager, Object).
A dialog with such a preliminary instance id is not considered a known
dialog, i.e.
DialogManager.hasDialog(DialogInstanceId)
will return false until
#createDialogInternal(DialogInstanceId, DialogServiceManager, Object)
is called.
dialogId - the id of the dialog to be created
protected java.lang.String getNextInstanceId()
public void addLifeCycleListener(LifeCycleListener listener)
LifeCycleListenerSupport
addLifeCycleListener in interface LifeCycleListenerSupportlistener - the listener to addcom.sdm.quasar.client.comp.dlgdef.mgmt.TechnicalDialogLifeCycleObservable#addDialogLifeCycleListener(com.sdm.quasar.client.comp.dlgdef.mgmt.TechnicalDialogLifeCycleListener)public void removeLifeCycleListener(LifeCycleListener listener)
LifeCycleListenerSupport
removeLifeCycleListener in interface LifeCycleListenerSupportlistener - the listener to removecom.sdm.quasar.client.comp.dlgdef.mgmt.TechnicalDialogLifeCycleObservable#removeDialogLifeCycleListener(com.sdm.quasar.client.comp.dlgdef.mgmt.TechnicalDialogLifeCycleListener)
public void collectSystemInfo(ID id,
SystemInfoNode root,
SystemInfoOptions options)
DialogManagerID given.
collectSystemInfo in interface DialogManagerid - the ID to append system information to the node givenroot - the SystemInfoNode to add information to (guaranteed to be not null)options - contains additional options, that might influence the amount of
information added to the tree (guaranteed to be not null)DialogManager.collectSystemInfo(com.sdm.quasar.client.core.common.ID, com.sdm.quasar.client.core.common.sysinfo.SystemInfoNode, com.sdm.quasar.client.core.common.sysinfo.SystemInfoOptions)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||