com.sdm.quasar.client.core.dialogbase.services
Interface ResourceAccessService

All Superinterfaces:
Service
All Known Implementing Classes:
AbstractResourceAccessService, ConfigProviderResourceAccessService, ResourceAccessFeature

public interface ResourceAccessService
extends Service

A Service to access resource values.

Version:
1.0
Author:
Thomas Wolf

Method Summary
 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.
 

Method Detail

hasValue

public boolean hasValue(java.lang.String key)
Returns true, iff there exists a resource object mapping for the given resource key.

Parameters:
key - the key to the resource object (not null)

hasValue

public 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.

Parameters:
keyClass - the key class (not null)

getValue

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

Parameters:
key - the key to the resource object (not null)
Returns:
the value of the resource object, may be null.

getStringValue

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

Parameters:
key - the key to the resource object (not null)
Returns:
the value of the resource object, may be null.
Throws:
java.lang.ClassCastException - if the resource object for the key is not a String

getValue

public java.lang.Object getValue(java.lang.Class keyClass)
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.

Parameters:
keyClass - the key class (not null)
Returns:
the value of the resource object, may be null.

hasValue

public 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.

Parameters:
key - the key to the resource object (not null)
locale - the Locale to get values for

getValue

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

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.