com.zphinx.spine.resources
Class ConfigResources

java.lang.Object
  extended by com.zphinx.spine.resources.ConfigResources

public class ConfigResources
extends Object

ConfigResources allows access to various configuration parameters and provides a default means to access the default properties file used for configuration.

Version:
1.0

Copyright © Zphinx Software Solutions

Author:
David Ladapo

Method Summary
static ConfigResources getInstance()
          Gets the static instance of this object.
static ConfigResources getInstance(Locale loca)
          Gets the static instance of this object.
 PropertyResourceBundle getResourceBundle()
          Gets the PropertyResourceBundle associated with this object
static String getString(String key)
          Gets the locale sensitive string defined by this key
 String getString(String key, Object[] arguments)
          Iterates over the registered message provider to get the given message key.
 String getString(String key, Object[] arguments, Locale locale)
          Iterates over the registered message provider to get the given message key.
 String getString(String providerId, String key, Object[] arguments)
          Tries to find the desired entry in the named message provider.
 String getString(String providerId, String key, Object[] arguments, Locale locale)
          Tries to find the desired entry in the named message provider.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getString

public static String getString(String key)
Gets the locale sensitive string defined by this key

Parameters:
key - The key to the object been fetched
Returns:
The locale sensitive string

getResourceBundle

public PropertyResourceBundle getResourceBundle()
Gets the PropertyResourceBundle associated with this object

Returns:
Returns the RESOURCE_BUNDLE.

getInstance

public static ConfigResources getInstance(Locale loca)
Gets the static instance of this object.

Returns:
The static instance of this object

getInstance

public static ConfigResources getInstance()
Gets the static instance of this object.

Returns:
The static instance of this object

getString

public String getString(String key,
                        Object[] arguments,
                        Locale locale)
Iterates over the registered message provider to get the given message key.

Parameters:
key - The desired message key
arguments - The dynamic parts of the message that will be evaluated.
locale - The locale in which the message will be printed
Returns:
The localized text

getString

public String getString(String key,
                        Object[] arguments)
Iterates over the registered message provider to get the given message key.

Parameters:
key - The desired message key
arguments - The dynamic parts of the message that will be evaluated.

getString

public String getString(String providerId,
                        String key,
                        Object[] arguments,
                        Locale locale)
Tries to find the desired entry in the named message provider.

Parameters:
providerId - The name of the message provider (i.e. source) to use for the message
key - The desired message key
arguments - The dynamic parts of the message that will be evaluated using the standard java text formatting abilities.
locale - The locale in which the message will be printed
Returns:
The localized text

getString

public String getString(String providerId,
                        String key,
                        Object[] arguments)
Tries to find the desired entry in the named message provider.

Parameters:
providerId - The name of the message provider (i.e. source) to use for the message
key - The desired message key
arguments - The dynamic parts of the message that will be evaluated using the standard java text formatting abilities.
Returns:
The localized text