public class AvailableShippingGroups
extends atg.servlet.DynamoServlet
The droplet sorts shipping addresses so that the default address is first and returns only permitted shipping addresses.
This droplet takes the following parameters
Output parameters
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static atg.nucleus.naming.ParameterName |
DEFAULT_ID
Default id parameter name.
|
static atg.nucleus.naming.ParameterName |
DEFAULT_KEY
Default key parameter name.
|
static atg.nucleus.naming.ParameterName |
EMPTY
Empty parameter name.
|
static atg.nucleus.naming.ParameterName |
MAP
Map parameter name.
|
static atg.nucleus.naming.ParameterName |
SORT_BY_KEYS
Sort by keys parameter name
|
Constructor and Description |
---|
AvailableShippingGroups() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getCountryCode(atg.commerce.order.ShippingGroup pShippingGroup)
Returns country code for the given item.
|
atg.core.i18n.CountryList |
getCountryList() |
CountryRestrictionsService |
getCountryRestrictionsService() |
StoreGiftlistManager |
getGiftlistManager() |
java.util.List |
getPermittedCountryCodes() |
java.util.List |
getRestrictedCountryCodes() |
java.lang.Object[] |
getSortedAddressList(java.lang.String pDefaultKey,
java.lang.String pSortByKeysParameter,
java.util.Map pMap)
This method converts a map of items to a sorted array of map entries
with the default item in the beginning of the array.
|
java.lang.Object[] |
getSortedArray(java.util.Map pMap,
java.lang.String pDefaultKey,
boolean pSortByKeys)
Converts the map to the array of map entries with the default one in the beginning of the array.
|
boolean |
isRemoveGiftShippingGroups() |
void |
service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
See the class documentation above.
|
void |
setCountryList(atg.core.i18n.CountryList pCountryList) |
void |
setCountryRestrictionsService(CountryRestrictionsService pCountryRestrictionsService) |
void |
setGiftlistManager(StoreGiftlistManager pGiftlistManager) |
void |
setPermittedCountryCodes(java.util.List pPermittedCountryCodes) |
void |
setRemoveGiftShippingGroups(boolean pRemoveGiftShippingGroups) |
void |
setRestrictedCountryCodes(java.util.List pRestrictedCountryCodes) |
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 EMPTY
public static final atg.nucleus.naming.ParameterName MAP
public static final atg.nucleus.naming.ParameterName DEFAULT_ID
public static final atg.nucleus.naming.ParameterName DEFAULT_KEY
public static final atg.nucleus.naming.ParameterName SORT_BY_KEYS
public CountryRestrictionsService getCountryRestrictionsService()
public void setCountryRestrictionsService(CountryRestrictionsService pCountryRestrictionsService)
pCountryRestrictionsService
- the countryRestrictionsService to setpublic atg.core.i18n.CountryList getCountryList()
public void setCountryList(atg.core.i18n.CountryList pCountryList)
pCountryList
- - country list.public java.util.List getPermittedCountryCodes()
public void setPermittedCountryCodes(java.util.List pPermittedCountryCodes)
pPermittedCountryCodes
- - permitted country list.public java.util.List getRestrictedCountryCodes()
public void setRestrictedCountryCodes(java.util.List pRestrictedCountryCodes)
pRestrictedCountryCodes
- - restricted country codes.public boolean isRemoveGiftShippingGroups()
public void setRemoveGiftShippingGroups(boolean pRemoveGiftShippingGroups)
pRemoveGiftShippingGroups
- Set the removeShippingGroups flagpublic StoreGiftlistManager getGiftlistManager()
public void setGiftlistManager(StoreGiftlistManager pGiftlistManager)
Set
- a new GiftlistManagerpublic void service(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
service
in class atg.servlet.DynamoServlet
pRequest
- the request to be processedpResponse
- the response object for this requestjavax.servlet.ServletException
- an application specific error occurred
processing this requestjava.io.IOException
- an error occurred reading data from the request
or writing data to the response.protected java.lang.String getCountryCode(atg.commerce.order.ShippingGroup pShippingGroup)
map
- entry item that contains countrypublic java.lang.Object[] getSortedArray(java.util.Map pMap, java.lang.String pDefaultKey, boolean pSortByKeys)
pSortByKeys
boolean is true then map entries are sorted by keys.pMap
- - the map to convert to the sorted arraypDefaultKey
- - the map key that corresponds to the default itempSortByKeys
- - boolean that specifies whether to sort items by keys or notpublic java.lang.Object[] getSortedAddressList(java.lang.String pDefaultKey, java.lang.String pSortByKeysParameter, java.util.Map pMap)
pDefaultKey
- defines the map key of the default item that should be
placed in the beginning of the array.pSortByKeysParameter
- is set to true then the returning array will be sorted by keys
otherwise an unsorted array will be returned.
In the case of a null map, the returning array would be null.pMap
- defines the map of items to convert to the sorted array.