com.sdm.quasar.client.core.dialog.services
Interface DialogDefinitionService

All Superinterfaces:
Service
All Known Implementing Classes:
DefaultDialogDefinitionService

public interface DialogDefinitionService
extends Service

This service allows the definition of dialogs. These definitions may be used when creating dialog instances.

Note: DialogDefinitionService is a core service and will therefore be available always for all dialogs in the dialog hierarchy. The Service will be provided at the session node (the root dialog of a session).

Version:
1.0
Author:
Thomas Wolf

Field Summary
static java.lang.String ROOT_DIALOG
          Dialog ID for the root dialog (normaly without visible representation).
 
Method Summary
 void addDialogDefinition(java.lang.String dialogId, DialogConfiguration dialogConfiguration, DialogProperties dialogProperties)
          Adds a dialog defintion to this manager.
 void addDialogDefinitionsWithReader(DialogDefinitionReader dialogDefinitionReader)
          Adds dialog definitions using the DialogDefinitionReader to this DialogHierarchyService.
 DialogConfiguration getDialogConfiguration(java.lang.String dialogId)
          Returns the dialog configuration for the given dialog id
 DialogProperties getDialogProperties(java.lang.String dialogId)
          Returns the dialog properties for the given dialog id
 java.lang.String getRootDialogId()
          Returns the dialog id for the root dialog.
 boolean hasDialogDefinition(java.lang.String dialogId)
          Returns true if a dialog was defined for the given dialog id.
 void setRootDialogId(java.lang.String dialogId)
          Sets the dialog id for the root dialog.
 

Field Detail

ROOT_DIALOG

public static final java.lang.String ROOT_DIALOG
Dialog ID for the root dialog (normaly without visible representation). This dialog normaly is representing to the session.

See Also:
Constant Field Values
Method Detail

addDialogDefinition

public void addDialogDefinition(java.lang.String dialogId,
                                DialogConfiguration dialogConfiguration,
                                DialogProperties dialogProperties)
Adds a dialog defintion to this manager.

Parameters:
dialogId - the dialog id for the dialog to define; must be not null and unique under the dialog definitions already made
dialogConfiguration - a DialogConfiguration, that configures a newly created dialog instance (not null)
dialogProperties - a DialogProperties, that delivers static properties for the dialog defined (not null)
Throws:
java.lang.IllegalArgumentException - if one of the arguments is null or a dialog is already defined for the id given

addDialogDefinitionsWithReader

public void addDialogDefinitionsWithReader(DialogDefinitionReader dialogDefinitionReader)
                                    throws java.io.IOException
Adds dialog definitions using the DialogDefinitionReader to this DialogHierarchyService.

Parameters:
dialogDefinitionReader - the DialogDefinitionReader to be used for reading the dialog definitions
Throws:
java.io.IOException - if an exception occurs while reading the definitions.

hasDialogDefinition

public boolean hasDialogDefinition(java.lang.String dialogId)
Returns true if a dialog was defined for the given dialog id.

Parameters:
dialogId - the dialog id
Returns:
true iff a dialog definition is available

getDialogConfiguration

public DialogConfiguration getDialogConfiguration(java.lang.String dialogId)
Returns the dialog configuration for the given dialog id

Parameters:
dialogId - the dialog id
Returns:
the dialog configuration for the given dialog id
Throws:
java.lang.IllegalArgumentException - if there is no configuration for the given dialog id

getDialogProperties

public DialogProperties getDialogProperties(java.lang.String dialogId)
Returns the dialog properties for the given dialog id

Parameters:
dialogId - the dialog id
Returns:
the dialog properties for the given dialog id
Throws:
java.lang.IllegalArgumentException - if there is no properties for the given dialog id

getRootDialogId

public java.lang.String getRootDialogId()
Returns the dialog id for the root dialog. The default value of this property is ROOT_DIALOG.


setRootDialogId

public void setRootDialogId(java.lang.String dialogId)
Sets the dialog id for the root dialog.

Parameters:
dialogId - the dialog id for the root dialog to set