com.sdm.quasar.client.core.dialogbase.features
Class ResourceAccessFeature

java.lang.Object
  extended bycom.sdm.quasar.client.core.dialog.AbstractFeature
      extended bycom.sdm.quasar.client.core.dialogbase.features.ResourceAccessFeature
All Implemented Interfaces:
Feature, ResourceAccessService, Service, SystemInfoProvider

public class ResourceAccessFeature
extends AbstractFeature
implements ResourceAccessService

Version:
1.$Revision$
Author:
Thomas Wolf

Constructor Summary
ResourceAccessFeature()
          Creates a new ResourceAccessFeature.
 
Method Summary
protected  void dispose()
          Called when the feature or dialog is disposed.
 java.lang.String getStringValue(java.lang.String key)
          Returns the resource String corresponding to the given resource key.
 java.lang.Object getValue(java.lang.Class keyClass)
          Returns the resource Object corresponding to the given resource key class.
 java.lang.Object getValue(java.lang.String key)
          Returns the resource Object corresponding to the given resource key.
 java.lang.Object getValue(java.lang.String key, java.util.Locale locale)
          Returns the resource Object corresponding to the given resource key.
 boolean hasValue(java.lang.Class keyClass)
          Returns true, iff there exists a resource object mapping for The key class will be converted to it's full qualified class name, under which the resource object must be specified.
 boolean hasValue(java.lang.String key)
          Returns true, iff there exists a resource object mapping for the given resource key.
 boolean hasValue(java.lang.String key, java.util.Locale locale)
          Returns true, iff there exists a resource object mapping for the given resource key in the specified language.
protected  void init()
          Called when the feature is initializing.
 
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

ResourceAccessFeature

public ResourceAccessFeature()
Creates a new ResourceAccessFeature.

Method Detail

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

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
See Also:
AbstractFeature.dispose()

getValue

public java.lang.Object getValue(java.lang.String key,
                                 java.util.Locale locale)
Description copied from interface: ResourceAccessService
Returns the resource Object corresponding to the given resource key. If no resource value is defined for the key, null will be returned.

Specified by:
getValue in interface ResourceAccessService
Parameters:
key - the key to the resource object (not null)
locale - the Locale to get values for
Returns:
the value of the resource object, may be null.
See Also:
ResourceAccessService.getValue(java.lang.String, java.util.Locale)

hasValue

public boolean hasValue(java.lang.String key,
                        java.util.Locale locale)
Description copied from interface: ResourceAccessService
Returns true, iff there exists a resource object mapping for the given resource key in the specified language.

Specified by:
hasValue in interface ResourceAccessService
Parameters:
key - the key to the resource object (not null)
locale - the Locale to get values for
See Also:
ResourceAccessService.hasValue(java.lang.String, java.util.Locale)

getValue

public java.lang.Object getValue(java.lang.String key)
Description copied from interface: ResourceAccessService
Returns the resource Object corresponding to the given resource key. If no resource value is defined for the key, null will be returned.

Specified by:
getValue in interface ResourceAccessService
Parameters:
key - the key to the resource object (not null)
Returns:
the value of the resource object, may be null.
See Also:
ResourceAccessService.getValue(java.lang.String)

getValue

public java.lang.Object getValue(java.lang.Class keyClass)
Description copied from interface: ResourceAccessService
Returns the resource Object corresponding to the given resource key class. The key class will be converted to it's full qualified class name, under which the resource object must be specified.

Specified by:
getValue in interface ResourceAccessService
Parameters:
keyClass - the key class (not null)
Returns:
the value of the resource object, may be null.
See Also:
ResourceAccessService.getValue(java.lang.Class)

hasValue

public boolean hasValue(java.lang.String key)
Description copied from interface: ResourceAccessService
Returns true, iff there exists a resource object mapping for the given resource key.

Specified by:
hasValue in interface ResourceAccessService
Parameters:
key - the key to the resource object (not null)
See Also:
ResourceAccessService.hasValue(java.lang.String)

hasValue

public boolean hasValue(java.lang.Class keyClass)
Description copied from interface: ResourceAccessService
Returns true, iff there exists a resource object mapping for The key class will be converted to it's full qualified class name, under which the resource object must be specified.

Specified by:
hasValue in interface ResourceAccessService
Parameters:
keyClass - the key class (not null)
See Also:
ResourceAccessService.hasValue(java.lang.Class)

getStringValue

public java.lang.String getStringValue(java.lang.String key)
Description copied from interface: ResourceAccessService
Returns the resource String corresponding to the given resource key. If no resource value is defined for the key, null will be returned.

Specified by:
getStringValue in interface ResourceAccessService
Parameters:
key - the key to the resource object (not null)
Returns:
the value of the resource object, may be null.
See Also:
ResourceAccessService.getStringValue(java.lang.String)