com.sdm.quasar.client.jsf.binding.features
Class DialogResolverFeature

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractFeature
      extended bycom.sdm.quasar.client.jsf.binding.features.DialogResolverFeature
All Implemented Interfaces:
Feature, KeywordResolver, SystemInfoProvider

public class DialogResolverFeature
extends AbstractFeature
implements KeywordResolver

This KeywordResolver resolves the keyword DIALOG_KEYWORD to a dialog instance: The resolved object is again a KeywordResolver provided by the current dialog instance performing the next resolving step. This Feature should be installed at the root (i.e. session) dialog.

Author:
Martin Haft

Field Summary
static java.lang.String DIALOG_KEYWORD
          Keyword defining the variable name that can be used in JSPs to access the current dialog-instance.
 
Constructor Summary
DialogResolverFeature()
           
 
Method Summary
 boolean canResolve(java.lang.String keyword)
          Checks, if this resolver is responsible to resolve the given keyword
protected  void dispose()
          Called when the feature or dialog is disposed.
 java.lang.Class getResolvedType(java.lang.String keyword)
          
protected  void init()
          Called when the feature is initializing.
 java.lang.Object resolve(java.lang.String keyword)
          Resolves the DIALOG pseudo-bean which stands for the current dialog-instance.
 
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
 

Field Detail

DIALOG_KEYWORD

public static final java.lang.String DIALOG_KEYWORD
Keyword defining the variable name that can be used in JSPs to access the current dialog-instance.

See Also:
Constant Field Values
Constructor Detail

DialogResolverFeature

public DialogResolverFeature()
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

canResolve

public boolean canResolve(java.lang.String keyword)
Checks, if this resolver is responsible to resolve the given keyword

Specified by:
canResolve in interface KeywordResolver
Parameters:
keyword - the keywort to be resolved
Returns:
true, if the given keyword can be resolved
See Also:
com.sdm.quasar.client.jsf.binding.KeywordResolver#canResolve(Object)

getResolvedType

public java.lang.Class getResolvedType(java.lang.String keyword)

Specified by:
getResolvedType in interface KeywordResolver
Parameters:
keyword - the keyword to be resolve
Returns:
the class of the resolved object
See Also:
com.sdm.quasar.client.jsf.binding.KeywordResolver#getType(Object)

resolve

public java.lang.Object resolve(java.lang.String keyword)
Resolves the DIALOG pseudo-bean which stands for the current dialog-instance. Performs the resolve step according to the keyword. The Result may be

Specified by:
resolve in interface KeywordResolver
Parameters:
keyword - the keyword to be resolve
Returns:
the resolved object
See Also:
com.sdm.quasar.client.jsf.binding.KeywordResolver#resolve(Object)