com.sdm.quasar.client.core.dialogbase.services
Interface DialogCreationService

All Superinterfaces:
Service
All Known Implementing Classes:
DialogCreationFeature

public interface DialogCreationService
extends Service

This is a Service that creates new dialogs.

It may be provided by a Session to create new independent dialogs. I.e. in its lifecycle the new dialog depends only on the lifecycle of the session.

Equally a dialog (e.g. a portal) may provide this service to offer other dialogs to create new sub dialogs. The life cycle of the sub dialog depends on the lifecycle of the dialog that provides this service.


Method Summary
 boolean canCreateDialog(java.lang.String dialogId)
          Tests, whether the dialog with the given id can be created.
 DialogInstanceId createDialog(java.lang.String dialogId, java.lang.Object context)
          Creates a new independent dialog.
 DialogInstanceId createDialog(java.lang.String dialogId, java.lang.Object context, DeactivationCallback deactivationCallback)
          Creates a new independent dialog.
 

Method Detail

createDialog

public DialogInstanceId createDialog(java.lang.String dialogId,
                                     java.lang.Object context)
Creates a new independent dialog. The parent of the dialog is the session.

Parameters:
dialogId - Id of the dialog to be created
context - Context information for the new dialog (may be null)
Returns:
the dialog instance id of the new dialog

createDialog

public DialogInstanceId createDialog(java.lang.String dialogId,
                                     java.lang.Object context,
                                     DeactivationCallback deactivationCallback)
Creates a new independent dialog. The parent of the dialog is the session. A DeactivationCallback is registrated.

Parameters:
dialogId - Id of the dialog to be created
context - Context information for the new dialog (may be null)
deactivationCallback - The callback will be noticed when the created dialog ist deactivated (may be null)
Returns:
the dialog instance id of the new dialog

canCreateDialog

public boolean canCreateDialog(java.lang.String dialogId)
Tests, whether the dialog with the given id can be created.

Parameters:
dialogId - Id of the dialog to be created
Returns:
true, iff the dialog can be created