com.bankframe.fe.statemachine.base.apploaders
Class LocalDataSet

java.lang.Object
  extended bycom.bankframe.fe.statemachine.base.apploaders.LocalDataSet

public class LocalDataSet
extends java.lang.Object


Field Summary
static java.util.Locale EMPTY_LOCALE
          This is the Locale of last resort used by this class.
 
Constructor Summary
LocalDataSet()
          Creates new LocalDataSet
 
Method Summary
 void addLocalData(LocalData data)
          Adds a new data item.
 LocalData getLocalData(java.util.Locale locale)
          Returns the best available LocalData for the given Locale.
 java.util.Locale getNearestAvailableLocale(java.util.Locale locale)
          Returns the nearest available Locale to the given Locale.
 void resolveReferences()
          Resolves the relationships between the data items in this LocalDataSet.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_LOCALE

public static java.util.Locale EMPTY_LOCALE
This is the Locale of last resort used by this class.

Its value is 'new Locale("", "")'.

Constructor Detail

LocalDataSet

public LocalDataSet()
Creates new LocalDataSet

Method Detail

addLocalData

public void addLocalData(LocalData data)
                  throws java.lang.IllegalStateException
Adds a new data item.

Parameters:
data -
Throws:
java.lang.IllegalStateException - if called after resolveReferences.

getLocalData

public LocalData getLocalData(java.util.Locale locale)
Returns the best available LocalData for the given Locale.

Parameters:
locale -
Returns:
A LocalData matching the given Locale, or the nearest available Locale.

getNearestAvailableLocale

public java.util.Locale getNearestAvailableLocale(java.util.Locale locale)
Returns the nearest available Locale to the given Locale.

This method checks the Locales in the following order:

If no match is found, this method will return the empty locale (if data is available for that locale.) or null.


resolveReferences

public void resolveReferences()
Resolves the relationships between the data items in this LocalDataSet.

This method must be called after the last data item has been added, before calling getLocalData.
The method ensures each data item knows its parent locale within the available locales.



Copyright © 2004 Siebel Systems, Inc. All rights reserved.