com.iphrase.onestep.beans
Class Prose

java.lang.Object
  |
  +--com.iphrase.onestep.beans.Prose

public class Prose
extends java.lang.Object

A container for localized texts designed to be used with the prose_xx.jsp files. An instance of Prose file is initialized with texts in a language used for the response and stored in a PageContext. Locailized texts are stored in a map and can be accessed by their names.


Constructor Summary
Prose()
           
 
Method Summary
static java.lang.String getFormattedStringArray(java.lang.String[] strArray, java.lang.String lastDlm, java.lang.String otherDlm)
          Formats a list of texts using specified delimeters.
 java.lang.String getString(java.lang.String strKey)
          Returns a localized text by its name
 void setString(java.lang.String strKey, java.lang.String strValue)
          Adds the specified localized text and its name to the map.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Prose

public Prose()
Method Detail

getString

public java.lang.String getString(java.lang.String strKey)
Returns a localized text by its name
Parameters:
strKey - a name by which stored in a map
Returns:
a localized text to which the specified key is mapped, otherwise return ""

setString

public void setString(java.lang.String strKey,
                      java.lang.String strValue)
Adds the specified localized text and its name to the map.
Parameters:
strKey - a localized text
strValue - a name used to access the localized text

getFormattedStringArray

public static java.lang.String getFormattedStringArray(java.lang.String[] strArray,
                                                       java.lang.String lastDlm,
                                                       java.lang.String otherDlm)
Formats a list of texts using specified delimeters. [str1 otherDlm str2 otherDlm ... strN-1 lastDlm strN]
Parameters:
strArray - a list of texts to format
lastDlm - last delimiter
otherDlm - delimiter between each word except last
Returns:
formatted string

© Copyright 2005, 2006. IBM Corporation. All rights reserved.