com.sap.caf.eu.gp.co.api

Class GPStandardResourceAccessor

java.lang.Object
  extended by ResourceAccessor
      extended by com.sap.caf.eu.gp.co.api.GPStandardResourceAccessor
All Implemented Interfaces:
IGPResourceAccessor

public class GPStandardResourceAccessor
extends ResourceAccessor
implements IGPResourceAccessor

Basic resource accessor imlementation to be used with background callable objects. The callable object implementation provider should extend this class by implementing the single constructor with paramter string. The paramter is the name of the resource bundle storing the text resources for the callable object. The class has to be extended in so that the resource bundle is properly loaded with the corresponding class loader.


Constructor Summary
GPStandardResourceAccessor(String bundleName)
          Constructs a basic resource acessor which loads text resource from the specified resource bundle.
 
Method Summary
 String getMessageText(Locale locale, String key)
          Returns a message text and accepts additional parameters.
 String getMessageText(Locale locale, String key, Object[] args)
          Returns a message text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GPStandardResourceAccessor

public GPStandardResourceAccessor(String bundleName)
Constructs a basic resource acessor which loads text resource from the specified resource bundle. The resource bundle will be laoded with the class loader loaded this class or extension of this class.`

Parameters:
bundleName -
Method Detail

getMessageText

public String getMessageText(Locale locale,
                             String key,
                             Object[] args)
Returns a message text. If the resource bundle for this resource accessors is missing returns the key.

Specified by:
getMessageText in interface IGPResourceAccessor
Parameters:
locale -
key -
Returns:
the localized text for the specified locale and key

getMessageText

public String getMessageText(Locale locale,
                             String key)
Returns a message text and accepts additional parameters. If the resource bundle for this resource accessors is missing the moethod returns the key.

Specified by:
getMessageText in interface IGPResourceAccessor
Parameters:
locale -
key -
args -
Returns:
the localized text for the specified locale and key


Copyright 2009 SAP AG Complete Copyright Notice