com.sdm.quasar.client.core.dialog.services.impl
Class DefaultDialogDefinitionService

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.services.impl.DefaultDialogDefinitionService
All Implemented Interfaces:
DialogDefinitionService, Service, SystemInfoProvider

public class DefaultDialogDefinitionService
extends java.lang.Object
implements DialogDefinitionService, SystemInfoProvider

A default implementation of DialogDefinitionService

Version:
1.$Revision$
Author:
Thomas Wolf

Field Summary
 
Fields inherited from interface com.sdm.quasar.client.core.dialog.services.DialogDefinitionService
ROOT_DIALOG
 
Constructor Summary
DefaultDialogDefinitionService()
          Creates a new DefaultDialogDefinitionService.
DefaultDialogDefinitionService(DialogDefinitionReader dialogDefinitionReader)
          Creates a new DefaultDialogDefinitionService.
DefaultDialogDefinitionService(java.lang.String rootDialogId)
          Creates a new DefaultDialogDefinitionService.
DefaultDialogDefinitionService(java.lang.String rootDialogId, DialogDefinitionReader dialogDefinitionReader)
          Creates a new DefaultDialogDefinitionService.
 
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.
 void collectSystemInfo(SystemInfoNode root, SystemInfoOptions options)
          Builds the system information tree upon local information of the implementor.
 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.
protected  void removeDialogDefinition(java.lang.String dialogId)
          Removes a previously added dialog definition.
 void setRootDialogId(java.lang.String dialogId)
          Sets the dialog id for the root dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDialogDefinitionService

public DefaultDialogDefinitionService()
Creates a new DefaultDialogDefinitionService.


DefaultDialogDefinitionService

public DefaultDialogDefinitionService(java.lang.String rootDialogId)
Creates a new DefaultDialogDefinitionService.

Parameters:
rootDialogId - the root dialog id

DefaultDialogDefinitionService

public DefaultDialogDefinitionService(DialogDefinitionReader dialogDefinitionReader)
                               throws java.io.IOException
Creates a new DefaultDialogDefinitionService.

Parameters:
dialogDefinitionReader - a DialogDefinitionReader used to initially read dialog definitions

DefaultDialogDefinitionService

public DefaultDialogDefinitionService(java.lang.String rootDialogId,
                                      DialogDefinitionReader dialogDefinitionReader)
                               throws java.io.IOException
Creates a new DefaultDialogDefinitionService.

Parameters:
rootDialogId - the root dialog id
dialogDefinitionReader - a DialogDefinitionReader used to initially read dialog definitions
Method Detail

getRootDialogId

public java.lang.String getRootDialogId()
Description copied from interface: DialogDefinitionService
Returns the dialog id for the root dialog. The default value of this property is DialogDefinitionService.ROOT_DIALOG.

Specified by:
getRootDialogId in interface DialogDefinitionService
See Also:
DialogDefinitionService.getRootDialogId()

setRootDialogId

public void setRootDialogId(java.lang.String dialogId)
Description copied from interface: DialogDefinitionService
Sets the dialog id for the root dialog.

Specified by:
setRootDialogId in interface DialogDefinitionService
Parameters:
dialogId - the dialog id for the root dialog to set
See Also:
DialogDefinitionService.setRootDialogId(java.lang.String)

addDialogDefinition

public void addDialogDefinition(java.lang.String dialogId,
                                DialogConfiguration dialogConfiguration,
                                DialogProperties dialogProperties)
Description copied from interface: DialogDefinitionService
Adds a dialog defintion to this manager.

Specified by:
addDialogDefinition in interface DialogDefinitionService
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)
See Also:
DialogDefinitionService.addDialogDefinition(java.lang.String, com.sdm.quasar.client.core.dialog.services.DialogConfiguration, com.sdm.quasar.client.core.dialog.services.DialogProperties)

addDialogDefinitionsWithReader

public void addDialogDefinitionsWithReader(DialogDefinitionReader dialogDefinitionReader)
                                    throws java.io.IOException
Description copied from interface: DialogDefinitionService
Adds dialog definitions using the DialogDefinitionReader to this DialogHierarchyService.

Specified by:
addDialogDefinitionsWithReader in interface DialogDefinitionService
Parameters:
dialogDefinitionReader - the DialogDefinitionReader to be used for reading the dialog definitions
Throws:
java.io.IOException - if an exception occurs while reading the definitions.
See Also:
DialogDefinitionService.addDialogDefinitionsWithReader(com.sdm.quasar.client.core.dialog.services.DialogDefinitionReader)

removeDialogDefinition

protected void removeDialogDefinition(java.lang.String dialogId)
Removes a previously added dialog definition.

Parameters:
dialogId - the dialog id to remove definition of

getDialogConfiguration

public DialogConfiguration getDialogConfiguration(java.lang.String dialogId)
Description copied from interface: DialogDefinitionService
Returns the dialog configuration for the given dialog id

Specified by:
getDialogConfiguration in interface DialogDefinitionService
Parameters:
dialogId - the dialog id
Returns:
the dialog configuration for the given dialog id
See Also:
DialogDefinitionService.getDialogConfiguration(java.lang.String)

getDialogProperties

public DialogProperties getDialogProperties(java.lang.String dialogId)
Description copied from interface: DialogDefinitionService
Returns the dialog properties for the given dialog id

Specified by:
getDialogProperties in interface DialogDefinitionService
Parameters:
dialogId - the dialog id
Returns:
the dialog properties for the given dialog id
See Also:
DialogDefinitionService.getDialogProperties(java.lang.String)

hasDialogDefinition

public boolean hasDialogDefinition(java.lang.String dialogId)
Description copied from interface: DialogDefinitionService
Returns true if a dialog was defined for the given dialog id.

Specified by:
hasDialogDefinition in interface DialogDefinitionService
Parameters:
dialogId - the dialog id
Returns:
true iff a dialog definition is available
See Also:
DialogDefinitionService.hasDialogDefinition(java.lang.String)

collectSystemInfo

public void collectSystemInfo(SystemInfoNode root,
                              SystemInfoOptions options)
Description copied from interface: SystemInfoProvider
Builds the system information tree upon local information of the implementor. The system information tree can be used within development by inspecting the system; so implementors should append their internal state (depending on the details settings within SystemInfoOptions). The information can be appended to the tree by adding new child SystemInformationNodes to the root node given using the SystemInfoNode.createChild(String) method and by setting information attributes the these nodes or the given root node.

Specified by:
collectSystemInfo in interface SystemInfoProvider
Parameters:
root - 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)
See Also:
SystemInfoProvider.collectSystemInfo(com.sdm.quasar.client.core.common.sysinfo.SystemInfoNode, com.sdm.quasar.client.core.common.sysinfo.SystemInfoOptions)