com.sdm.quasar.client.core.dialog.lifecycle
Interface SubDialogLifeCycleController

All Superinterfaces:
LifeCycleStateProvider
All Known Implementing Classes:
DefaultSubDialogLifeCycleController

public interface SubDialogLifeCycleController
extends LifeCycleStateProvider

This is a control interface for the lifecycle of a concrete child-dialog of the dialog acting for.

Note: There exists only one working SubDialogLifeCycleController per child dialog instance. If a second one is created on the same child, the inactive instance must throw IllegalStateExceptions by calling any of it's methods.

Version:
1.0
Author:
Thomas Wolf, sd&m AG

Method Summary
 void activateDialog()
          Activates the child-dialog.
 void addDisposeCallback(DisposeCallback disposeCallback)
          Adds a DisposeCallback, that will be called, when the child dialog controlled was disposed.
 void deactivateDialog()
          Deactivates the child-dialog.
 void prepareDialog()
          Prepares the child-dialog.
 void releaseDialog()
          Releases the child-dialog.
 
Methods inherited from interface com.sdm.quasar.client.core.dialog.lifecycle.LifeCycleStateProvider
getLifeCycleState
 

Method Detail

prepareDialog

public void prepareDialog()
Prepares the child-dialog.

Precondition: The parent dialog must be at least preparing. The controlled subdialog must be created.

Throws:
java.lang.IllegalStateException - if called when controller is not active (replaced by another one)
java.lang.IllegalArgumentException - if subDialog is null or it controls no direct child of the dialog acting for.

activateDialog

public void activateDialog()
Activates the child-dialog.

Precondition: The parent dialog must be active or activating. The controlled subdialog must be prepeared.

Throws:
java.lang.IllegalStateException - if called when controller is not active (replaced by another one)
java.lang.IllegalArgumentException - if subDialog is null or it controls no direct child of the dialog acting for.

deactivateDialog

public void deactivateDialog()
Deactivates the child-dialog.

Precondition: The parent dialog must be active or deactivating. The controlled subdialog must be active

Throws:
java.lang.IllegalStateException - if called when controller is not active (replaced by another one)
java.lang.IllegalArgumentException - if subDialog is null or it controls no direct child of the dialog acting for.

releaseDialog

public void releaseDialog()
Releases the child-dialog.

Precondition: The parent dialog must be prepared or releasing. The controlled subdialog must be prepeared.

Throws:
java.lang.IllegalStateException - if called when controller is not active (replaced by another one)
java.lang.IllegalArgumentException - if subDialog is null or it controls no direct child of the dialog acting for.

addDisposeCallback

public void addDisposeCallback(DisposeCallback disposeCallback)
Adds a DisposeCallback, that will be called, when the child dialog controlled was disposed.

Parameters:
disposeCallback - the DisposeCallback to call back (not null)