FileDocCategorySizeDatePackage
CLILocalStringsManager.javaAPI DocGlassfish v2 API5718Fri May 04 22:34:10 BST 2007com.sun.enterprise.admin.util

CLILocalStringsManager

public class CLILocalStringsManager extends LocalStringsManager
Implementation of a CLI local string manager as CLI-specific wrapper around LocalStringsManager; Provides access to i18n messages for classes that need them. This particular implementation presents the following resources organization:
  • 1. Resource files share locations with sources (same directories);
  • 2. Base directory is "com.sun.enterprise.admin";
  • 3. Search ONLY in first resource bundle, which found on the way up to basePackage( No additional hiearchical search of value if it is not found in that file)

Fields Summary
static final String
CLI_BASE_PACKAGE
static final String
DEFAULT_PROPERTY_FILE_NAME
Constructors Summary
public CLILocalStringsManager()



     
    
        super(CLI_BASE_PACKAGE, DEFAULT_PROPERTY_FILE_NAME);
        setFixedResourceBundle(CLI_BASE_PACKAGE);
    
Methods Summary
public java.lang.StringgetString(java.lang.String key, java.lang.String defaultValue)
Get a localized string.

param
key The name of the resource to fetch
param
defaultValue The default return value if not found
return
The localized string

        return  super.getString(key, defaultValue);
    
public java.lang.StringgetString(java.lang.String key, java.lang.String defaultFormat, java.lang.Object[] args)
Get a local string and format the arguments accordingly.

param
key The key to the local format string
param
defaultFormat The default format if not found in the resources
param
arguments The set of arguments to provide to the formatter
return
A formatted localized string

        return  super.getString(key, defaultFormat, args);
    
public java.lang.StringgetString(java.lang.String key, java.lang.String defaultFormat, java.lang.Object arg1)
Convenience method - getString() overriding for fixed number of formatting arguments.

param
key The key to the local format string
param
defaultFormat The default format if not found in the resources
param
arg1 The first argument to provide to the formatter
return
A formatted localized string

        return  getString(key, defaultFormat, (new Object[]{arg1}));
    
public java.lang.StringgetString(java.lang.String key, java.lang.String defaultFormat, java.lang.Object arg1, java.lang.Object arg2)
Convenience method - getString() overriding for fixed number of formatting arguments.

param
key The key to the local format string
param
defaultFormat The default format if not found in the resources
param
arg1 The first argument to provide to the formatter
param
arg1 The second argument to provide to the formatter
return
A formatted localized string

        return  getString(key, defaultFormat, (new Object[]{arg1, arg2}));
    
public java.lang.StringgetString(java.lang.String key, java.lang.String defaultFormat, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
Convenience method - getString() overriding for fixed number of formatting arguments.

param
key The key to the local format string
param
defaultFormat The default format if not found in the resources
param
arg1 The first argument to provide to the formatter
param
arg2 The second argument to provide to the formatter
param
arg3 The third argument to provide to the formatter
return
A formatted localized string

        return  getString(key, defaultFormat, (new Object[]{arg1, arg2, arg3}));