|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.projects.store.util.CountryRestrictionsService
public class CountryRestrictionsService
This class contains different methods that are user in AvailableShippingGroups droplet
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
CountryRestrictionsService()
|
Method Summary | |
---|---|
boolean |
checkCountryInPermittedList(java.lang.String countryCode,
java.util.List pPermittedCountryList)
Checks if country is in permitted country list |
static java.lang.String |
getCountryName(java.lang.String pCountryCode,
java.util.Locale pUserLocale)
This static method gets localized country name from the Resource Bundle based on the input locale. |
java.lang.String |
getDisplayNameForCode(java.util.ResourceBundle pResourceBundle,
java.lang.String pCode,
java.lang.String pDefault)
This method returns the localized display name for the country code provided as input. |
java.util.List |
getPermittedCountryList(atg.servlet.DynamoHttpServletRequest pRequest,
java.util.List pPermittedCountryCodes,
java.util.List pRestrictedCountryCodes,
atg.core.i18n.CountryList pCountryList)
Gets the list of permitted country codes |
java.util.ResourceBundle |
getResourceBundle(atg.servlet.DynamoHttpServletRequest pRequest)
Gets the resource bundle for user local, specified in request |
boolean |
isPermittedCountry(java.util.List pResultCountryList,
java.lang.String pCountryCode)
Check if country code is permitted. |
java.util.List |
removeCountryWithCode(java.util.ResourceBundle pResourceBundle,
java.util.List pCodesToDelete,
java.util.List pCountryList)
This method removes the country codes (codesToDelete) from the country list (countryList) and returns the resultant list having localized country names. |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
Constructor Detail |
---|
public CountryRestrictionsService()
Method Detail |
---|
public boolean isPermittedCountry(java.util.List pResultCountryList, java.lang.String pCountryCode)
pResultCountryList
- the results country listpCountryCode
- the country code
public java.util.List removeCountryWithCode(java.util.ResourceBundle pResourceBundle, java.util.List pCodesToDelete, java.util.List pCountryList)
pResourceBundle
- Resource Bundle used for country names localization.pCodesToDelete
- ArrayList Country codes to delete.pCountryList
- ArrayList List of countries.
public java.lang.String getDisplayNameForCode(java.util.ResourceBundle pResourceBundle, java.lang.String pCode, java.lang.String pDefault)
pResourceBundle
- Resource Bundle used for country name localization.pCode
- String Country code.pDefault
- String Default value if localized country name is not found.
public java.util.ResourceBundle getResourceBundle(atg.servlet.DynamoHttpServletRequest pRequest)
pRequest
- the DynamoHttpServletRequest
public boolean checkCountryInPermittedList(java.lang.String countryCode, java.util.List pPermittedCountryList)
countryCode
- code of country to look in permitted country listpPermittedCountryList
- list of permitted country codes
public java.util.List getPermittedCountryList(atg.servlet.DynamoHttpServletRequest pRequest, java.util.List pPermittedCountryCodes, java.util.List pRestrictedCountryCodes, atg.core.i18n.CountryList pCountryList)
pRequest
- the DynamoHttpServletRequestpPermittedCountryCodes
- the permitted country codespRestrictedCountryCodes
- the restricted country codespCountryList
- the country list
public static java.lang.String getCountryName(java.lang.String pCountryCode, java.util.Locale pUserLocale) throws atg.droplet.DropletException
pCountryCode
- String Country Code.pUserLocale
- Locale user locale.
atg.droplet.DropletException
- an exception within Droplet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |