public class StoreGiftWithPurchaseFormHandler
extends atg.commerce.promotion.GiftWithPurchaseFormHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected java.lang.String |
mAjaxMakeGiftSelectionErrorURL
property: ajaxMakeGiftSelectionErrorURL
|
protected java.lang.String |
mAjaxMakeGiftSelectionSuccessURL
property: ajaxMakeGiftSelectionSuccessURL
|
protected java.lang.String |
mAjaxMakeGiftSelectionTimeoutURL
property: ajaxMakeGiftSelectionTimeoutURL
|
protected StoreInventoryManagerInterface |
mInventoryManager
property: inventoryManager
|
protected StoreProfileTools |
mProfileTools
property: profileTools
|
static java.lang.String |
MSG_ERROR_GIFT_OUT_OF_STOCK |
static java.lang.String |
MSG_ERROR_SELECT_COLOR |
static java.lang.String |
MSG_ERROR_SELECT_GIFT |
static java.lang.String |
MSG_ERROR_SELECT_PRODUCT |
static java.lang.String |
MSG_ERROR_SELECT_PRODUCT_AND_SKU |
static java.lang.String |
MSG_ERROR_SELECT_SIZE |
static java.lang.String |
MSG_ERROR_SELECT_SKU |
static java.lang.String |
MSG_ERROR_SELECT_WOOD_FINISH |
static java.lang.String |
MSG_ERROR_SELECTED_SKU_IS_INVALID |
static java.lang.String |
SKU_PARAMETER |
mCommerceItemType, mCurrentSelectedItemId, mExtraParameters, mGiftHashCode, mGwpManager, mMakeGiftSelectionErrorURL, mMakeGiftSelectionSuccessURL, mProductId, mPromotionId, mQuantity, mQuantityWithFraction, mRemoveAllSelectableQuantityErrorURL, mRemoveAllSelectableQuantitySuccessURL, mRemoveSelectableQuantityErrorURL, mRemoveSelectableQuantitySuccessURL, mReplaceFailedQuantity, mReplaceRemovedQuantity, mSelectableQuantityToRemove, mSelectableQuantityWithFractionToRemove, MSG_ERROR_MAKE_GIFT_SELECTION, MSG_ERROR_REMOVE_SELECTABLE_QUANTITY, mShippingGroup, mSiteId, mSkuId
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUE
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
Constructor and Description |
---|
StoreGiftWithPurchaseFormHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkFormRedirect(java.lang.String pSuccessURL,
java.lang.String pFailureURL,
atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
If the request is a form submission from:
A non-transient user who is not currently logged in.
A transient user who is using a brand new session or if their shopping cart is empty.
Redirect to a session expiration URL.
|
java.lang.String |
getAjaxMakeGiftSelectionErrorURL() |
java.lang.String |
getAjaxMakeGiftSelectionSuccessURL() |
java.lang.String |
getAjaxMakeGiftSelectionTimeoutURL() |
atg.repository.MutableRepository |
getCatalogRepository() |
StoreInventoryManagerInterface |
getInventoryManager() |
StoreProfileTools |
getProfileTools() |
java.util.Map |
getRequiredSkuAttributes() |
java.lang.String |
getSkuType() |
boolean |
handleMakeGiftSelection(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Check if this is an AJAX request first and update success/error URLs.
|
void |
preMakeGiftSelection(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Set valid SKU ID based on selected Product
|
void |
setAjaxMakeGiftSelectionErrorURL(java.lang.String pAjaxMakeGiftSelectionErrorURL) |
void |
setAjaxMakeGiftSelectionSuccessURL(java.lang.String pAjaxMakeGiftSelectionSuccessURL) |
void |
setAjaxMakeGiftSelectionTimeoutURL(java.lang.String pAjaxMakeGiftSelectionTimeoutURL) |
void |
setCatalogRepository(atg.repository.MutableRepository pCatalogRepository) |
void |
setInventoryManager(StoreInventoryManagerInterface pInventoryManager) |
void |
setProfileTools(StoreProfileTools pProfileTools) |
void |
setRequiredSkuAttributes(java.util.Map pRequiredSkuAttributes) |
void |
setSkuType(java.lang.String pSkuType) |
protected void |
validateAjaxSelection(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Validate selection has been made via AJAX and choose appropriate selection based
on missed SKU attributes.
|
getCatalogKey, getCommerceItemType, getCurrentSelectedItemId, getExtraParameters, getGiftHashCode, getGwpManager, getMakeGiftSelectionErrorURL, getMakeGiftSelectionSuccessURL, getPricingContext, getProductId, getPromotionId, getQuantity, getQuantityWithFraction, getRemoveAllSelectableQuantityErrorURL, getRemoveAllSelectableQuantitySuccessURL, getRemoveSelectableQuantityErrorURL, getRemoveSelectableQuantitySuccessURL, getReplaceFailedQuantity, getReplaceRemovedQuantity, getSelectableQuantityToRemove, getSelectableQuantityWithFractionToRemove, getShippingGroup, getSiteId, getSkuId, handleRemoveAllSelectableQuantity, handleRemoveSelectableQuantity, makeGiftSelection, postMakeGiftSelection, postRemoveAllSelectableQuantity, postRemoveSelectableQuantity, preRemoveAllSelectableQuantity, preRemoveSelectableQuantity, removeAllSelectableQuantity, removeSelectableQuantity, setCommerceItemType, setCurrentSelectedItemId, setExtraParameters, setGiftHashCode, setGwpManager, setMakeGiftSelectionErrorURL, setMakeGiftSelectionSuccessURL, setProductId, setPromotionId, setQuantity, setQuantityWithFraction, setRemoveAllSelectableQuantityErrorURL, setRemoveAllSelectableQuantitySuccessURL, setRemoveSelectableQuantityErrorURL, setRemoveSelectableQuantitySuccessURL, setReplaceFailedQuantity, setReplaceRemovedQuantity, setSelectableQuantityToRemove, setSelectableQuantityWithFractionToRemove, setShippingGroup, setSiteId, setSkuId, updateOrder
acquireTransactionLock, acquireTransactionLock, afterSet, beforeSet, commitTransaction, copyConfiguration, createRepriceParameterMap, defaultLocalLockManager, defaultUserProfile, doStartService, ensureTransaction, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getClaimableManager, getCommerceIdentifierPaymentInfoContainer, getCommerceItemManager, getCommerceItemShippingInfoContainer, getCommerceProfileTools, getCommercePropertyManager, getConfiguration, getCurrentTransaction, getDefaultLocale, getGiftlistManager, getHandlingInstructionManager, getLocalLockManager, getOrder, getOrderManager, getPaymentGroupManager, getPaymentGroupMapContainer, getPipelineManager, getPriceList, getPriceListId, getPriceListManager, getProfile, getProfileRepository, getPurchaseProcessHelper, getRepeatingRequestMonitor, getRepriceOrderChainId, getResourceBundle, getResourceBundle, getResourceBundleName, getSessionExpirationURL, getShippingGroupManager, getShippingGroupMapContainer, getShoppingCart, getTransactionManager, getUserLocale, getUserLocale, getUserPricingModels, handlePipelineError, isConcurrentUpdate, isEnsureTransaction, isFormSubmission, isTransactionCreated, isTransactionMarkedAsRollBack, isUseLocksAroundTransactions, isUseRequestLocale, processException, processPipelineErrors, releaseTransactionLock, releaseTransactionLock, runProcess, runProcess, runProcess, runProcessRepriceOrder, runProcessRepriceOrder, runRepricingProcess, setClaimableManager, setCommerceIdentifierPaymentInfoContainer, setCommerceItemManager, setCommerceItemShippingInfoContainer, setCommerceProfileTools, setCommercePropertyManager, setConfiguration, setCurrentTransaction, setDefaultLocale, setEnsureTransaction, setGiftlistManager, setHandlingInstructionManager, setLocalLockManager, setOrder, setOrderManager, setPaymentGroupManager, setPaymentGroupMapContainer, setPipelineManager, setPriceListId, setPriceListManager, setProfile, setProfileRepository, setPurchaseProcessHelper, setRepeatingRequestMonitor, setRepriceOrderChainId, setSessionExpirationURL, setShippingGroupManager, setShippingGroupMapContainer, setShoppingCart, setTransactionCreated, setTransactionManager, setTransactionToRollbackOnly, setUseLocksAroundTransactions, setUseRequestLocale, setUserLocale, setUserPricingModels, transactionLockName, unsetTransactionCreated
addFormException, addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
addLogListener, createAdminServlet, 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 java.lang.String MSG_ERROR_GIFT_OUT_OF_STOCK
public static final java.lang.String MSG_ERROR_SELECTED_SKU_IS_INVALID
public static final java.lang.String MSG_ERROR_SELECT_PRODUCT
public static final java.lang.String MSG_ERROR_SELECT_SKU
public static final java.lang.String MSG_ERROR_SELECT_GIFT
public static final java.lang.String MSG_ERROR_SELECT_PRODUCT_AND_SKU
public static final java.lang.String MSG_ERROR_SELECT_COLOR
public static final java.lang.String MSG_ERROR_SELECT_SIZE
public static final java.lang.String MSG_ERROR_SELECT_WOOD_FINISH
public static final java.lang.String SKU_PARAMETER
protected java.lang.String mAjaxMakeGiftSelectionSuccessURL
protected java.lang.String mAjaxMakeGiftSelectionErrorURL
protected java.lang.String mAjaxMakeGiftSelectionTimeoutURL
protected StoreInventoryManagerInterface mInventoryManager
protected StoreProfileTools mProfileTools
public java.util.Map getRequiredSkuAttributes()
public void setRequiredSkuAttributes(java.util.Map pRequiredSkuAttributes)
pRequiredSkuAttributes
- - a map of attributes user need to specify to define SKU, for example
for clothing SKU it is color and size.public java.lang.String getSkuType()
public void setSkuType(java.lang.String pSkuType)
pSkuType
- - the SKU type.public java.lang.String getAjaxMakeGiftSelectionSuccessURL()
public void setAjaxMakeGiftSelectionSuccessURL(java.lang.String pAjaxMakeGiftSelectionSuccessURL)
pAjaxMakeGiftSelectionSuccessURL
- - the AJAX gift selection success URL.public java.lang.String getAjaxMakeGiftSelectionErrorURL()
public void setAjaxMakeGiftSelectionErrorURL(java.lang.String pAjaxMakeGiftSelectionErrorURL)
pAjaxMakeGiftSelectionErrorURL
- - the AJAX gift selection error URL.public java.lang.String getAjaxMakeGiftSelectionTimeoutURL()
public void setAjaxMakeGiftSelectionTimeoutURL(java.lang.String pAjaxMakeGiftSelectionTimeoutURL)
pAjaxMakeGiftSelectionTimeoutURL
- - The URL that holds the JSON session timeout object data.public StoreInventoryManagerInterface getInventoryManager()
public void setInventoryManager(StoreInventoryManagerInterface pInventoryManager)
pInventoryManager
- - the inventoryManager.public StoreProfileTools getProfileTools()
public void setProfileTools(StoreProfileTools pProfileTools)
pProfileTools
- - The profile tools utility class.public atg.repository.MutableRepository getCatalogRepository()
public void setCatalogRepository(atg.repository.MutableRepository pCatalogRepository)
pCatalogRepository
- -
the value of the catalogRepository: field.public void preMakeGiftSelection(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
preMakeGiftSelection
in class atg.commerce.promotion.GiftWithPurchaseFormHandler
javax.servlet.ServletException
java.io.IOException
public boolean handleMakeGiftSelection(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
handleMakeGiftSelection
in class atg.commerce.promotion.GiftWithPurchaseFormHandler
pRequest
- - the HTTP request parameter.pResponse
- - the HTTP response parameter.javax.servlet.ServletException
- if servlet error occurs.java.io.IOException
- if there was an error with servlet io.protected void validateAjaxSelection(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- - the HTTP request parameter.pResponse
- - the HTTP response parameter.javax.servlet.ServletException
- if servlet error occurs.java.io.IOException
- if there was an error with servlet io.public boolean checkFormRedirect(java.lang.String pSuccessURL, java.lang.String pFailureURL, atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
If the request is a form submission from:
checkFormRedirect
in class atg.commerce.order.purchase.PurchaseProcessFormHandler
pSuccessURL
- a String
value.pFailureURL
- a String
value.pRequest
- the servlet's request.pResponse
- the servlet's response.javax.servlet.ServletException
- if there was an error while executing the code.java.io.IOException
- if there was an error with servlet io.