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 Collection
s 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 aCollection
ofCountry
objects representing the active states in the system.Retrieves aMap
, each of whose keys is a country code, and whose values is the correspondingCountry
object.Retrieves aMap
, each of whose keys is a state code, and whose values is the correspondingState
object.Retrieves aCollection
ofState
objects representing the active states in the system.void
setCountries
(Collection countries) void
setCountryMap
(Map countries) void
setStateMap
(Map states) void
setStates
(Collection states) Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject
initialize
-
Method Details
-
getStates
Collection getStates()Retrieves aCollection
ofState
objects representing the active states in the system.- Returns:
- A
Collection
ofState
objects representing the active states in the system.
-
setStates
-
getCountries
Collection getCountries()Retrieves aCollection
ofCountry
objects representing the active states in the system.- Returns:
- A
Collection
ofCountry
objects 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 correspondingState
object.- Returns:
- A
Map
, each of whose keys is a state code, and whose values is the correspondingState
object.
-
setStateMap
-
getCountryMap
Map getCountryMap()Retrieves aMap
, each of whose keys is a country code, and whose values is the correspondingCountry
object.- Returns:
- A
Map
, each of whose keys is a country code, and whose values is the correspondingCountry
object.
-
setCountryMap
-