com.sdm.quasar.client.core.dialogbase.services
Class AbstractActivationService

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractPerChildService
      extended bycom.sdm.quasar.client.core.dialogbase.services.AbstractActivationService
All Implemented Interfaces:
ActivationService, Disposable, Service

public abstract class AbstractActivationService
extends AbstractPerChildService
implements ActivationService

A basic implementation of ActivationService. The concrete implementation should use this SubDialogControl (see AbstractPerChildService.getSubDialogControl()) to activate or deactivate the subdialog when requested.

Note: This class registers itself as ActivationService to the SubDialogControl given. Use the registrationContext object to unregister this service.

Version:
1.0
Author:
Thomas Wolf

Constructor Summary
AbstractActivationService(DialogControl dialogControl, SubDialogControl subDialogControl, java.lang.String registrationContext)
          Creates a new AbstractActivationService.
 
Method Summary
protected  boolean canDeactivate()
          Queries the registered objection callbacks that are concerned with a deactivation of the sub dialog installed for.
protected  boolean canDeactivate(DialogInstanceId dialogInstanceId)
          Queries the registered objection callbacks that are concerned with a deactivation of the given diid to see if any object to deactivation.
 void dispose()
          Disposes the component.
protected  boolean isActive()
          Returns true, if the subdialog acting for is currently active or is activating.
 
Methods inherited from class com.sdm.quasar.client.core.dialog.AbstractPerChildService
getDialogControl, getSubDialogControl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sdm.quasar.client.core.dialogbase.services.ActivationService
requestActivate, requestDeactivate
 

Constructor Detail

AbstractActivationService

public AbstractActivationService(DialogControl dialogControl,
                                 SubDialogControl subDialogControl,
                                 java.lang.String registrationContext)
Creates a new AbstractActivationService.

Method Detail

isActive

protected boolean isActive()
Returns true, if the subdialog acting for is currently active or is activating.


canDeactivate

protected boolean canDeactivate()
Queries the registered objection callbacks that are concerned with a deactivation of the sub dialog installed for.

Returns:
true iff no registered callback has objected

canDeactivate

protected boolean canDeactivate(DialogInstanceId dialogInstanceId)
Queries the registered objection callbacks that are concerned with a deactivation of the given diid to see if any object to deactivation.

Returns:
true iff no registered callback has objected

dispose

public void dispose()
             throws DisposeException
Description copied from interface: Disposable
Disposes the component.

Important:
This method is called by an administrating component and must never be called directly.

The implementation should release any resources or objects allocated and any services registered. Furthermore, this method should be developed carefully to free a maximum of resources even when the system may have become unstable. In case of one or multiple errors, you should collect them in a DisposeException, continue with the execution, and throw it at the end of the method.

Note: The implementation must not return before the component is disposed. Any threads or asynchronous calls started must be completed before this method returns.

Specified by:
dispose in interface Disposable
Throws:
DisposeException - if there was one or more errors while disposing the component.
See Also:
Disposable.dispose()