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

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.services.impl.DefaultDialogLifeCycleService
All Implemented Interfaces:
DialogLifeCycleService, LifeCycleListenerSupport, Service

public class DefaultDialogLifeCycleService
extends java.lang.Object
implements DialogLifeCycleService

A simple default implementation of DialogLifeCycleService based upon DialogManager.

Version:
1.0
Author:
Thomas Wolf

Constructor Summary
DefaultDialogLifeCycleService(DialogManager dialogManager)
          Constructor
 
Method Summary
 void addLifeCycleListener(LifeCycleListener listener)
          Registers an observer of the life cycle of dialogs.
 LifeCycleState getLifeCycleState(DialogInstanceId diid)
          Returns a LifeCycleState for the given id.
 boolean hasDialog(DialogInstanceId diid)
           
 void removeLifeCycleListener(LifeCycleListener listener)
          Unregisters an observer of the life cycle of dialogs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDialogLifeCycleService

public DefaultDialogLifeCycleService(DialogManager dialogManager)
Constructor

Parameters:
dialogManager -
Method Detail

hasDialog

public boolean hasDialog(DialogInstanceId diid)
See Also:
com.sdm.quasar.client.core.dialog.services.DialogLifeCycleService#hasDialog(com.sdm.quasar.client.core.dialog.DialogInstanceId)

getLifeCycleState

public LifeCycleState getLifeCycleState(DialogInstanceId diid)
Description copied from interface: DialogLifeCycleService
Returns a LifeCycleState 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.

Specified by:
getLifeCycleState in interface DialogLifeCycleService
Parameters:
diid - the id to get a LifeCycleState for
Returns:
the LifeCycleState for the id
See Also:
DialogLifeCycleService.getLifeCycleState(com.sdm.quasar.client.core.dialog.DialogInstanceId)

addLifeCycleListener

public void addLifeCycleListener(LifeCycleListener listener)
Description copied from interface: LifeCycleListenerSupport
Registers an observer of the life cycle of dialogs. The order of the registration of observers are preserved. The observers are notified in reverse order.

Specified by:
addLifeCycleListener in interface LifeCycleListenerSupport
Parameters:
listener - the listener to add
See Also:
LifeCycleListenerSupport.addLifeCycleListener(com.sdm.quasar.client.core.dialog.lifecycle.LifeCycleListener)

removeLifeCycleListener

public void removeLifeCycleListener(LifeCycleListener listener)
Description copied from interface: LifeCycleListenerSupport
Unregisters an observer of the life cycle of dialogs.

Specified by:
removeLifeCycleListener in interface LifeCycleListenerSupport
Parameters:
listener - the listener to remove
See Also:
LifeCycleListenerSupport.removeLifeCycleListener(com.sdm.quasar.client.core.dialog.lifecycle.LifeCycleListener)