public class CountryRestrictionsDroplet
extends atg.servlet.DynamoServlet
This droplet is used to obtain a list of permitted countries in various situations. By specifying an optional country code we are able to return the details of that specific country along with an oparam to indicate whether or not it is restricted or permitted. In the event of no country code being specified the droplet simply returns a list of all permitted countries.
The droplet takes the following input parameters:
The droplet sets the following output parameters:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
COUNTRIES_PARAM
Countries parameter name.
|
static atg.nucleus.naming.ParameterName |
COUNTRY_CODE
Country code parameter name.
|
static java.lang.String |
COUNTRY_DETAIL_PARAM
Country details parameter name.
|
static java.lang.String |
FALSE_OPARAM
Oparam: false.
|
static java.lang.String |
OUTPUT_OPARAM
Oparam: output.
|
static java.lang.String |
TRUE_OPARAM
Oparam: true.
|
Constructor and Description |
---|
CountryRestrictionsDroplet() |
Modifier and Type | Method and Description |
---|---|
atg.core.i18n.CountryList |
getCountryList() |
CountryRestrictionsService |
getCountryRestrictionsService() |
java.lang.String |
getPermittedCountriesPropertyName() |
java.lang.String |
getRestrictedCountriesPropertyName() |
void |
service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Service method.
|
void |
setCountryList(atg.core.i18n.CountryList pCountryList) |
void |
setCountryRestrictionsService(CountryRestrictionsService pCountryRestrictionsService) |
void |
setPermittedCountriesPropertyName(java.lang.String pPermittedCountriesPropertyName) |
void |
setRestrictedCountriesPropertyName(java.lang.String pRestrictedCountriesPropertyName) |
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, init, service, service, setParameter
destroy, getServletConfig, getServletInfo, setServletInfo
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
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, toString
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static final java.lang.String CLASS_VERSION
public static final atg.nucleus.naming.ParameterName COUNTRY_CODE
public static final java.lang.String COUNTRIES_PARAM
public static final java.lang.String COUNTRY_DETAIL_PARAM
public static final java.lang.String OUTPUT_OPARAM
public static final java.lang.String TRUE_OPARAM
public static final java.lang.String FALSE_OPARAM
public java.lang.String getPermittedCountriesPropertyName()
public void setPermittedCountriesPropertyName(java.lang.String pPermittedCountriesPropertyName)
pPermittedCountriesPropertyName
- - permitted countries property name.public java.lang.String getRestrictedCountriesPropertyName()
public void setRestrictedCountriesPropertyName(java.lang.String pRestrictedCountriesPropertyName)
pRestrictedCountriesPropertyName
- - restricted countries property name.public atg.core.i18n.CountryList getCountryList()
public void setCountryList(atg.core.i18n.CountryList pCountryList)
pCountryList
- - master country list.public CountryRestrictionsService getCountryRestrictionsService()
public void setCountryRestrictionsService(CountryRestrictionsService pCountryRestrictionsService)
pCountryRestrictionsService
- the countryRestrictionsService to setpublic void service(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
service
in class atg.servlet.DynamoServlet
pRequest
- - http requestpResponse
- - http responsejavax.servlet.ServletException
- if an error occursjava.io.IOException
- if an error occurs