org.kuali.rice.location.framework.country
Class AbstractCountryValuesFinderBase

java.lang.Object
  extended by org.kuali.rice.krad.keyvalues.KeyValuesBase
      extended by org.kuali.rice.location.framework.country.AbstractCountryValuesFinderBase
All Implemented Interfaces:
Serializable, KeyValuesFinder
Direct Known Subclasses:
CountryNotRestrictedValuesFinder, CountryValuesFinder

public abstract class AbstractCountryValuesFinderBase
extends KeyValuesBase

An abstract KeyValuesBase for defining a values finder which produces a list of Countries. Sub-classes should extend this class and override retrieveCountriesForValuesFinder() in order to produce a list of countries to include.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
Serialized Form

Constructor Summary
AbstractCountryValuesFinderBase()
           
 
Method Summary
protected  Country getDefaultCountry()
          Returns the default country to use for this values finder.
 List<KeyValue> getKeyValues()
          Builds a list of key values representations for valid value selections.
protected abstract  List<Country> retrieveCountriesForValuesFinder()
          Returns a list of countries that will be added to the result of getKeyValues().
 
Methods inherited from class org.kuali.rice.krad.keyvalues.KeyValuesBase
clearInternalCache, getKeyLabel, getKeyLabelMap, getKeyValues, getOptionLabels, getOptionValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCountryValuesFinderBase

public AbstractCountryValuesFinderBase()
Method Detail

getKeyValues

public List<KeyValue> getKeyValues()
Description copied from interface: KeyValuesFinder
Builds a list of key values representations for valid value selections.

Returns:
List of KeyValue objects

retrieveCountriesForValuesFinder

protected abstract List<Country> retrieveCountriesForValuesFinder()
Returns a list of countries that will be added to the result of getKeyValues(). Note that the result may be filtered by active status

Returns:
a List of countries to include in the values returned by this finder

getDefaultCountry

protected Country getDefaultCountry()
Returns the default country to use for this values finder. If no default country is returned, none will be used. The default implementation of this method will defer to CountryService.getDefaultCountry().

Returns:
the default country to use for this values finder, or null if no default country should be used


Copyright © 2005-2014 The Kuali Foundation. All Rights Reserved.