com.sdm.quasar.client.jsf.dialog.features
Class DialogContextFeature

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractFeature
      extended bycom.sdm.quasar.client.jsf.dialog.features.DialogContextFeature
All Implemented Interfaces:
DialogContextService, Feature, Service, SystemInfoProvider

public class DialogContextFeature
extends AbstractFeature
implements DialogContextService


Constructor Summary
DialogContextFeature()
           
 
Method Summary
protected  void dispose()
          Called when the feature or dialog is disposed.
protected  DialogParameterHandler getDialogParameterHandler()
          Returns an instance of the DialogParameterHandler class that has been defined in the application's configuration.
protected  void init()
          Called when the feature is initializing.
protected  boolean redirect(java.lang.String url)
           
 boolean restoreDialogContext(HttpServletRequest request, ServletResponse response)
          This Service is used to connect the request to the dialog instance, defined by the parameters in the request.
 
Methods inherited from class com.sdm.quasar.client.core.dialog.AbstractFeature
activate, attachDialogControl, collectSystemInfo, deactivate, disposeFeature, getDialogControl, isInitialized, prepare, release
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogContextFeature

public DialogContextFeature()
Method Detail

dispose

protected void dispose()
                throws DisposeException
Description copied from class: AbstractFeature
Called when the feature or dialog is disposed. Override this method to clean up resources and free memory when disposing.

Specified by:
dispose in class AbstractFeature
Throws:
DisposeException

init

protected void init()
Description copied from class: AbstractFeature
Called when the feature is initializing. This is normally done, when the feature is connected to the lifecycle of the DialogControl installed to. To access the DialogControl use the AbstractFeature.getDialogControl() method.

Override this method to perform some action on initialization e.g. register public services.

Specified by:
init in class AbstractFeature

restoreDialogContext

public boolean restoreDialogContext(HttpServletRequest request,
                                    ServletResponse response)
Description copied from interface: DialogContextService
This Service is used to connect the request to the dialog instance, defined by the parameters in the request. If parameters are missing or no valid parameters the parameters are passed to a DialogParameterHandlerService to define the further strategy for handling this request.

Specified by:
restoreDialogContext in interface DialogContextService
Parameters:
request - the current reqest
response - the current response
Returns:
true: response is already completed, e.g. due to a redirect; the servlet filter chain has not to be processed further.

redirect

protected boolean redirect(java.lang.String url)
Parameters:
url - may be null
Returns:

getDialogParameterHandler

protected DialogParameterHandler getDialogParameterHandler()
Returns an instance of the DialogParameterHandler class that has been defined in the application's configuration.

Returns:
the UnknownRequestHandler instance to handle requests without an DialogInstanceId