Interface StatesAndCountries
- All Superinterfaces:
BusinessObject
- All Known Implementing Classes:
StatesAndCountriesBean
Interface containing representations of the states and countries active in
the store. The states and countries are listed for customers in the Struts
layer as they enter in address information.
The database stores states in the sscState table, and
countries in the sscCountry table. The Struts layer populates
the two Collections when the application starts. The data is
kept in the servlet's application scope and displayed to users filling in
address information.
When the application needs to create an instance that implements
StatesAndCountries,
BusinessObjectFactory
finds the name of the Java class to instantiate from the
"statesAndCountriesImplementer" setting in the
appComponents.properties file.
The default "statesAndCountriesImplementer" is
StatesAndCountriesBean.
- Author:
- David Tobey
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves aCollectionofCountryobjects representing the active states in the system.Retrieves aMap, each of whose keys is a country code, and whose values is the correspondingCountryobject.Retrieves aMap, each of whose keys is a state code, and whose values is the correspondingStateobject.Retrieves aCollectionofStateobjects representing the active states in the system.voidsetCountries(Collection countries) voidsetCountryMap(Map countries) voidsetStateMap(Map states) voidsetStates(Collection states) Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
-
Method Details
-
getStates
Collection getStates()Retrieves aCollectionofStateobjects representing the active states in the system.- Returns:
- A
CollectionofStateobjects representing the active states in the system.
-
setStates
-
getCountries
Collection getCountries()Retrieves aCollectionofCountryobjects representing the active states in the system.- Returns:
- A
CollectionofCountryobjects representing the active states in the system.
-
setCountries
-
getStateMap
Map getStateMap()Retrieves aMap, each of whose keys is a state code, and whose values is the correspondingStateobject.- Returns:
- A
Map, each of whose keys is a state code, and whose values is the correspondingStateobject.
-
setStateMap
-
getCountryMap
Map getCountryMap()Retrieves aMap, each of whose keys is a country code, and whose values is the correspondingCountryobject.- Returns:
- A
Map, each of whose keys is a country code, and whose values is the correspondingCountryobject.
-
setCountryMap
-