org.apache.shale.usecases.view
Class Domains

java.lang.Object
  extended by org.apache.shale.usecases.view.Domains

public class Domains
extends Object

Utility class to return locale-specific domains (lists of selection items) based on the current Locale of this request. An instance of this class will typically be defined as an application scope managed bean, so that it is instantiated on demand.

$Id: Domains.java 464373 2006-10-16 04:21:54Z rahul $


Constructor Summary
Domains()
           
 
Method Summary
 javax.faces.model.SelectItem[] getBlankCityAndStateItems()
          Return an array of selection items with two select items.
 javax.faces.model.SelectItem[] getCityAndStateItems(String zip)
          Return an array of selection items representing the city/state pair, given a zip code.
 String[] getStateNames()
          Return an array of state names in alphabetical order.
 javax.faces.model.SelectItem[] getStates()
          Return an array of selection items representing valid US state abbreviations and descriptions.
 javax.faces.model.SelectItem[] getSupportedCategories()
          Return an array of selection items representing the message categories supported by this application, with the labels localized based on the Locale of the current request.
 javax.faces.model.SelectItem[] getSupportedCategories(Locale locale)
          Return an array of selection items representing the message categories supported by this application, with the labels localized based on the specified Locale.
 javax.faces.model.SelectItem[] getSupportedLocales()
          Return an array of selection items representing the locales supported by this application, with the labels localized based on the Locale of the current request.
 javax.faces.model.SelectItem[] getSupportedLocales(Locale locale)
          Return an array of selection items representing the locales supported by this application, with the labels localized based on the specified Locale.
 javax.faces.model.SelectItem[] getZipCodeItems()
          Return an array of selection items representing the zip codes shown in the drop-down menu in zipCode.jsp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Domains

public Domains()
Method Detail

getStates

public javax.faces.model.SelectItem[] getStates()

Return an array of selection items representing valid US state abbreviations and descriptions.


getStateNames

public String[] getStateNames()

Return an array of state names in alphabetical order.


getSupportedCategories

public javax.faces.model.SelectItem[] getSupportedCategories()

Return an array of selection items representing the message categories supported by this application, with the labels localized based on the Locale of the current request.


getSupportedCategories

public javax.faces.model.SelectItem[] getSupportedCategories(Locale locale)

Return an array of selection items representing the message categories supported by this application, with the labels localized based on the specified Locale.


getSupportedLocales

public javax.faces.model.SelectItem[] getSupportedLocales()

Return an array of selection items representing the locales supported by this application, with the labels localized based on the Locale of the current request.


getSupportedLocales

public javax.faces.model.SelectItem[] getSupportedLocales(Locale locale)

Return an array of selection items representing the locales supported by this application, with the labels localized based on the specified Locale.

Parameters:
locale - Locale used to localize the labels

getZipCodeItems

public javax.faces.model.SelectItem[] getZipCodeItems()

Return an array of selection items representing the zip codes shown in the drop-down menu in zipCode.jsp.


getCityAndStateItems

public javax.faces.model.SelectItem[] getCityAndStateItems(String zip)

Return an array of selection items representing the city/state pair, given a zip code.

Parameters:
zip - String the zip code

getBlankCityAndStateItems

public javax.faces.model.SelectItem[] getBlankCityAndStateItems()

Return an array of selection items with two select items. Both items have empty strings for labels. Those items are used when an illegal value is entered for a zip code.



Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.