public class DefaultProductDetailsDroplet
extends atg.servlet.DynamoServlet
This droplet obtains currently viewed product and SKU from the current request and saves into request all necessary data to be displayed on the PDP.
Input parameters:
Output parameters:
availabilityType
is preorderable
or backorderable
, this parameter will be set.
Contains date when the SKU specified will be available.Open parameters:
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
AVAILABILITY_STATUS_AVAILABLE |
protected static java.lang.String |
AVAILABILITY_STATUS_BACKORDERABLE |
protected static java.lang.String |
AVAILABILITY_STATUS_PREORDERABLE |
protected static java.lang.String |
AVAILABILITY_STATUS_UNAVAILABLE |
static java.lang.String |
CLASS_VERSION
Class version string.
|
protected static java.lang.String |
OPEN_PARAMETER_OUTPUT |
protected static java.lang.String |
PARAMETER_AVAILABILITY_DATE |
protected static java.lang.String |
PARAMETER_AVAILABILITY_TYPE |
protected static java.lang.String |
PARAMETER_COMPARISONS_CONTAINS_PRODUCT |
protected static java.lang.String |
PARAMETER_GIFTLIST_CONTAINS_SKU |
protected static java.lang.String |
PARAMETER_GIFTLISTS |
protected static java.lang.String |
PARAMETER_PRODUCT |
protected static java.lang.String |
PARAMETER_QUANTITY |
protected static java.lang.String |
PARAMETER_SELECTED_SKU |
protected static java.lang.String |
PARAMETER_SHOW_EMAIL_A_FRIEND |
protected static java.lang.String |
PARAMETER_SHOW_GIFTLISTS |
protected static java.lang.String |
PARAMETER_SKUS |
protected static java.lang.String |
PARAMETER_WISHLIST_CONTAINS_SKU |
Constructor and Description |
---|
DefaultProductDetailsDroplet() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
areGiftlistsAvailable(atg.servlet.DynamoHttpServletRequest pRequest)
This method calculates
boolean flag, specifying if 'Add to
Giftlist' button should be displayed on the page. |
protected java.util.Collection<atg.repository.RepositoryItem> |
getAllSkus(atg.servlet.DynamoHttpServletRequest pRequest)
This method obtains a
Collection of all specified product
SKUs. |
protected java.util.Date |
getAvailabilityDate(atg.repository.RepositoryItem pSku,
atg.repository.RepositoryItem pProduct,
java.lang.String pAvailabilityType)
This method calculates availability date for the product and SKU specified.
|
protected java.lang.String |
getAvailabilityType(atg.repository.RepositoryItem pSku,
atg.repository.RepositoryItem pProduct)
This method calculates availability type for the product/SKU specified.
|
StoreCatalogTools |
getCatalogTools()
Gets the mCatalogTools
|
protected StoreProductComparisonList |
getCurrentComparisonsList(atg.servlet.DynamoHttpServletRequest pRequest)
This method retrieves current Comparisons List from the request specified.
|
atg.service.util.CurrentDate |
getCurrentDate()
Gets the CurrentDate component.
|
protected atg.repository.RepositoryItem |
getCurrentProduct(atg.servlet.DynamoHttpServletRequest pRequest)
This method takes currently viewed product from the request specified.
|
protected atg.userprofiling.Profile |
getCurrentProfile(atg.servlet.DynamoHttpServletRequest pRequest)
This method retrieves current profile from the request specified.
|
protected java.util.Collection<atg.repository.RepositoryItem> |
getCurrentProfileGiftlists(atg.servlet.DynamoHttpServletRequest pRequest)
This method calculates all user's giftlists to be displayed on the page.
|
atg.commerce.gifts.GiftlistSiteFilter |
getGiftListSiteFilter() |
atg.commerce.gifts.GiftlistTools |
getGiftlistTools() |
StoreInventoryManagerInterface |
getInventoryManager() |
StoreProductComparisonList |
getProductComparisonList()
Returns property productComparisonList.
|
atg.userprofiling.Profile |
getProfile()
Returns property currentProfile.
|
StorePropertyManager |
getProfilePropertyManager() |
protected long |
getQuantity(atg.servlet.DynamoHttpServletRequest pRequest)
This method calculates the quantity to be displayed on the PDP.Current
implementation returns 1.
|
protected atg.repository.RepositoryItem |
getSelectedSku(atg.servlet.DynamoHttpServletRequest pRequest)
This method takes currently selected SKU from the request.
|
StoreSitePropertiesManager |
getSitePropertiesManager() |
protected java.util.List |
giftlistsContainingSku(atg.repository.RepositoryItem pSelectedSkuRepositoryItem)
This method creates a list of Giftlist Ids by checking if currently
selected SKU is already added to the user's giftlist.
|
protected boolean |
isCurrentProductAddedToComparisons(atg.servlet.DynamoHttpServletRequest pRequest)
This method calculates
boolean flag, specifying if currently
viewed product is already added to the Comparisons list. |
protected boolean |
isCurrentSkuAddedToWishlist(atg.servlet.DynamoHttpServletRequest pRequest)
This method calculates a
boolean flag, specifying if currently
selected SKU is already added to the user's wishlist. |
protected boolean |
isEmailEnabled(atg.servlet.DynamoHttpServletRequest pRequest)
This method calculates
boolean flag, specifying if currently
viewed product can be emailed to a friend. |
void |
service(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This method provides the default implementation of service, by dispatching
to conventionally named methods which begin with "do".
|
protected void |
serviceContents(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
This method specifies, which open parameters should be serviced.
|
void |
setCatalogTools(StoreCatalogTools pCatalogTools)
Sets the mCatalogTools
|
void |
setCurrentDate(atg.service.util.CurrentDate pCurrentDate)
Sets the CurrentDate component.
|
void |
setGiftListSiteFilter(atg.commerce.gifts.GiftlistSiteFilter pGiftListSiteFilter) |
void |
setGiftlistTools(atg.commerce.gifts.GiftlistTools pGiftlistTools) |
void |
setInventoryManager(StoreInventoryManagerInterface pInventoryManager) |
void |
setProductComparisonList(StoreProductComparisonList pProductComparisonList)
Sets property productComparisonList.
|
void |
setProfile(atg.userprofiling.Profile pProfile)
Sets property currentProfile.
|
void |
setProfilePropertyManager(StorePropertyManager pProfilePropertyManager) |
void |
setSitePropertiesManager(StoreSitePropertiesManager pSitePropertiesManager) |
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
protected static final java.lang.String AVAILABILITY_STATUS_UNAVAILABLE
protected static final java.lang.String AVAILABILITY_STATUS_AVAILABLE
protected static final java.lang.String AVAILABILITY_STATUS_BACKORDERABLE
protected static final java.lang.String AVAILABILITY_STATUS_PREORDERABLE
protected static final java.lang.String OPEN_PARAMETER_OUTPUT
protected static final java.lang.String PARAMETER_AVAILABILITY_DATE
protected static final java.lang.String PARAMETER_AVAILABILITY_TYPE
protected static final java.lang.String PARAMETER_COMPARISONS_CONTAINS_PRODUCT
protected static final java.lang.String PARAMETER_PRODUCT
protected static final java.lang.String PARAMETER_QUANTITY
protected static final java.lang.String PARAMETER_SELECTED_SKU
protected static final java.lang.String PARAMETER_SHOW_EMAIL_A_FRIEND
protected static final java.lang.String PARAMETER_SHOW_GIFTLISTS
protected static final java.lang.String PARAMETER_SKUS
protected static final java.lang.String PARAMETER_WISHLIST_CONTAINS_SKU
protected static final java.lang.String PARAMETER_GIFTLISTS
protected static final java.lang.String PARAMETER_GIFTLIST_CONTAINS_SKU
public atg.commerce.gifts.GiftlistSiteFilter getGiftListSiteFilter()
public void setGiftListSiteFilter(atg.commerce.gifts.GiftlistSiteFilter pGiftListSiteFilter)
pGiftListSiteFilter
- the giftListSiteFilter to setpublic StoreInventoryManagerInterface getInventoryManager()
public void setInventoryManager(StoreInventoryManagerInterface pInventoryManager)
pInventoryManager
- the inventoryManager to setpublic StorePropertyManager getProfilePropertyManager()
public void setProfilePropertyManager(StorePropertyManager pProfilePropertyManager)
pProfilePropertyManager
- the profilePropertyManager to setpublic atg.commerce.gifts.GiftlistTools getGiftlistTools()
public void setGiftlistTools(atg.commerce.gifts.GiftlistTools pGiftlistTools)
pGiftlistTools
- the giftlistTools to setpublic StoreSitePropertiesManager getSitePropertiesManager()
public void setSitePropertiesManager(StoreSitePropertiesManager pSitePropertiesManager)
pSitePropertiesManager
- the sitePropertiesManager to setpublic StoreCatalogTools getCatalogTools()
public void setCatalogTools(StoreCatalogTools pCatalogTools)
pCatalogTools
- Value to setpublic void setCurrentDate(atg.service.util.CurrentDate pCurrentDate)
public atg.service.util.CurrentDate getCurrentDate()
public void setProductComparisonList(StoreProductComparisonList pProductComparisonList)
public StoreProductComparisonList getProductComparisonList()
public void setProfile(atg.userprofiling.Profile pProfile)
public atg.userprofiling.Profile getProfile()
public 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 void serviceContents(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- current request.pResponse
- current response.javax.servlet.ServletException
- if something goes wrong.java.io.IOException
- if something goes wrong.protected atg.userprofiling.Profile getCurrentProfile(atg.servlet.DynamoHttpServletRequest pRequest)
pRequest
- current request.protected StoreProductComparisonList getCurrentComparisonsList(atg.servlet.DynamoHttpServletRequest pRequest)
pRequest
- current request.protected long getQuantity(atg.servlet.DynamoHttpServletRequest pRequest)
pRequest
- current request.protected atg.repository.RepositoryItem getSelectedSku(atg.servlet.DynamoHttpServletRequest pRequest)
pRequest
- current request.protected atg.repository.RepositoryItem getCurrentProduct(atg.servlet.DynamoHttpServletRequest pRequest)
pRequest
- current request.protected java.util.Collection<atg.repository.RepositoryItem> getAllSkus(atg.servlet.DynamoHttpServletRequest pRequest)
Collection
of all specified product
SKUs. These SKU should be specified as skus
request parameter.pRequest
- current request.protected java.util.Date getAvailabilityDate(atg.repository.RepositoryItem pSku, atg.repository.RepositoryItem pProduct, java.lang.String pAvailabilityType)
pSku
- currently selected SKU.pProduct
- currently viewed product.pAvailabilityType
- product/SKU availability (i.e. 'available',
'preorderable', etc.)protected java.lang.String getAvailabilityType(atg.repository.RepositoryItem pSku, atg.repository.RepositoryItem pProduct)
pSku
- currently selected SKU.pProduct
- currently viewed product.String
protected java.util.Collection<atg.repository.RepositoryItem> getCurrentProfileGiftlists(atg.servlet.DynamoHttpServletRequest pRequest)
pRequest
- current request.protected boolean areGiftlistsAvailable(atg.servlet.DynamoHttpServletRequest pRequest)
boolean
flag, specifying if 'Add to
Giftlist' button should be displayed on the page. Current implementation
does not show this button to transient users or users without giftlists.pRequest
- current request.boolean
flag.protected boolean isCurrentSkuAddedToWishlist(atg.servlet.DynamoHttpServletRequest pRequest)
boolean
flag, specifying if currently
selected SKU is already added to the user's wishlist.pRequest
- current request.true
if SKU already added to the wishlist,
false
otherwise.protected boolean isCurrentProductAddedToComparisons(atg.servlet.DynamoHttpServletRequest pRequest)
boolean
flag, specifying if currently
viewed product is already added to the Comparisons list.pRequest
- current request.true
if current product is already added to the list,
false
otherwise.protected boolean isEmailEnabled(atg.servlet.DynamoHttpServletRequest pRequest)
boolean
flag, specifying if currently
viewed product can be emailed to a friend.pRequest
- current request.true
if 'Email a Friend' button should be displayed,
false
otherwise.protected java.util.List giftlistsContainingSku(atg.repository.RepositoryItem pSelectedSkuRepositoryItem)
pSelectedSkuRepositoryItem
- selected SKU.