ariba.util.i18n
Class MergedStringLocalizer

java.lang.Object
  extended by ariba.util.i18n.MergedStringLocalizer
All Implemented Interfaces:
StringTableProcessor, LocalizedJavaString.Localizer
Direct Known Subclasses:
AWMergedStringLocalizer

public class MergedStringLocalizer
extends java.lang.Object
implements StringTableProcessor, LocalizedJavaString.Localizer

String localizer that fetches strings from the Resource Service.


Constructor Summary
MergedStringLocalizer()
           
 
Method Summary
 java.util.Map cloneStringTable(java.util.Map stringTable)
           
static java.util.Map convertToLocalizedStringsTable(java.util.List lines)
          Returns a string table for the List of input lines from the resource file.
 StringCSVConsumer createStringCSVConsumer(java.net.URL url, boolean displayWarning)
          create a csv consumer.
 java.lang.Object defaultValueIfNullStringTable(java.lang.Object key)
           
 java.lang.String getLocalizedString(java.lang.String className, java.lang.String key, java.lang.String defaultString, java.util.Locale locale)
          implement LocalizedJavaString.Localizer interface
 java.util.Map getLocalizedStrings(java.lang.String stringTableFile, java.lang.String componentName, java.util.Locale locale)
           
static void mergeMapIntoMap(java.util.Map dest, java.util.Map source)
           
 void mergeStringTables(java.util.Map dest, java.util.Map source)
          Merge string map read from different directories.
static java.lang.String unescapeCsvString(java.lang.String originalString)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MergedStringLocalizer

public MergedStringLocalizer()
Method Detail

getLocalizedString

public java.lang.String getLocalizedString(java.lang.String className,
                                           java.lang.String key,
                                           java.lang.String defaultString,
                                           java.util.Locale locale)
implement LocalizedJavaString.Localizer interface

Specified by:
getLocalizedString in interface LocalizedJavaString.Localizer
Parameters:
className - name of the class in which the string is created.
key - unique key for the string within that classes
defaultString - original string
locale - locale for the string
Returns:
localized String. if localized string is not found, return the originalString

getLocalizedStrings

public java.util.Map getLocalizedStrings(java.lang.String stringTableFile,
                                         java.lang.String componentName,
                                         java.util.Locale locale)

cloneStringTable

public java.util.Map cloneStringTable(java.util.Map stringTable)

createStringCSVConsumer

public StringCSVConsumer createStringCSVConsumer(java.net.URL url,
                                                 boolean displayWarning)
Description copied from interface: StringTableProcessor
create a csv consumer.

Specified by:
createStringCSVConsumer in interface StringTableProcessor
Parameters:
url - location of csv file
displayWarning - flag that indicates whether warning should be displayed for errors

mergeStringTables

public void mergeStringTables(java.util.Map dest,
                              java.util.Map source)
Description copied from interface: StringTableProcessor
Merge string map read from different directories.

Specified by:
mergeStringTables in interface StringTableProcessor
Parameters:
dest - destination map
source - source map

mergeMapIntoMap

public static void mergeMapIntoMap(java.util.Map dest,
                                   java.util.Map source)

convertToLocalizedStringsTable

public static java.util.Map convertToLocalizedStringsTable(java.util.List lines)
Returns a string table for the List of input lines from the resource file. If resourcePath is non-null, the embedded contextualization information is included as part of the localized strings in the string table.


unescapeCsvString

public static java.lang.String unescapeCsvString(java.lang.String originalString)

defaultValueIfNullStringTable

public java.lang.Object defaultValueIfNullStringTable(java.lang.Object key)
Specified by:
defaultValueIfNullStringTable in interface StringTableProcessor


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.