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

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

public class KeywordResolverFeature
extends AbstractFeature
implements KeywordResolverService, KeywordResolver

This Feature implements a KeywordResolverService providing a KeywordResolver. Other KeywordResolver may be registrated at this: The implemented KeywordResolver asks its registered KeywordResolver for resolving the given keyword.

Author:
Martin Haft

Constructor Summary
KeywordResolverFeature()
           
 
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. Override this method to clean up resources and free memory when disposing.
 KeywordResolver getKeywordResolver()
           
 java.lang.Class getResolvedType(java.lang.String keyword)
           
protected  void init()
          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.

 void registerKeywordResolver(java.lang.String keyword, KeywordResolver keywordResolver)
           
 java.lang.Object resolve(java.lang.String keyword)
          Performs the resolve step according to the keyword.
 
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

KeywordResolverFeature

public KeywordResolverFeature()
Method Detail

init

protected void init()
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
See Also:
AbstractFeature.init()

dispose

protected void dispose()
                throws DisposeException
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
See Also:
com.sdm.quasar.client.core.dialog.AbstractFeature#disposing()

getKeywordResolver

public KeywordResolver getKeywordResolver()
Specified by:
getKeywordResolver in interface KeywordResolverService
Returns:
the KeywordResolver of the dialog, that provides this service.

resolve

public java.lang.Object resolve(java.lang.String keyword)
Description copied from interface: KeywordResolver
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

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

canResolve

public boolean canResolve(java.lang.String keyword)
Description copied from interface: KeywordResolver
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

registerKeywordResolver

public void registerKeywordResolver(java.lang.String keyword,
                                    KeywordResolver keywordResolver)