Interface CountryService
public interface CountryService
CountryService interface.
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionReturns all CountriesReturns all Countries that are not restricted.findCountries(org.kuali.rice.core.api.criteria.QueryByCriteria queryByCriteria) This method find Countries based on a query criteria.getCountry(String code) Lookup a country object based on the given country code.getCountryByAlternateCode(String alternateCode) Get a country object based on an alternate country codeReturns the system default country.
-
Method Details
-
getCountry
@Cacheable(value="http://rice.kuali.org/location/v2_0/CountryType", key="\'code=\' + #p0") Country getCountry(String code) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException Lookup a country object based on the given country code.- Parameters:
code- the given country code- Returns:
- a country object with the given country code. A null reference is returned if an invalid or non-existant code is supplied.
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException- if the code is blank or null
-
getCountryByAlternateCode
@Cacheable(value="http://rice.kuali.org/location/v2_0/CountryType", key="\'alternateCode=\' + #p0") Country getCountryByAlternateCode(String alternateCode) throws org.kuali.rice.core.api.exception.RiceIllegalStateException, org.kuali.rice.core.api.exception.RiceIllegalArgumentException Get a country object based on an alternate country code- Parameters:
alternateCode- the given alternate country code- Returns:
- A country object with the given alternate country code if a country with that alternate country code exists. Otherwise, null is returned.
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalStateException- if multiple Countries exist with the same passed in alternateCodeorg.kuali.rice.core.api.exception.RiceIllegalArgumentException- if alternateCode is null or is a whitespace only string.
-
findAllCountriesNotRestricted
@Cacheable(value="http://rice.kuali.org/location/v2_0/CountryType", key="\'allRestricted\'") List<Country> findAllCountriesNotRestricted()Returns all Countries that are not restricted.- Returns:
- all countries that are not restricted
-
findAllCountries
@Cacheable(value="http://rice.kuali.org/location/v2_0/CountryType", key="\'all\'") List<Country> findAllCountries()Returns all Countries- Returns:
- all countries
-
getDefaultCountry
@Cacheable(value="http://rice.kuali.org/location/v2_0/CountryType", key="\'default\'") Country getDefaultCountry()Returns the system default country. This is simply meant to be informational for applications which need the ability to utilize a default country (such as for defaulting of certain fields during data entry). This method may return null in situations where no default country is configured.- Returns:
- the default country, or null if no default country is defined
-
findCountries
CountryQueryResults findCountries(org.kuali.rice.core.api.criteria.QueryByCriteria queryByCriteria) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException This method find Countries based on a query criteria. The criteria cannot be null.- Parameters:
queryByCriteria- the criteria. Cannot be null.- Returns:
- query results. will never return null.
- Throws:
IllegalArgumentException- if the queryByCriteria is nullorg.kuali.rice.core.api.exception.RiceIllegalArgumentException- Since:
- 2.0.1
-