|
||||||||||
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.droplet.EmptyFormHandler
atg.droplet.GenericFormHandler
atg.commerce.order.purchase.PurchaseProcessFormHandler
atg.commerce.promotion.GiftWithPurchaseFormHandler
atg.projects.store.promotion.StoreGiftWithPurchaseFormHandler
public class StoreGiftWithPurchaseFormHandler
CRS extension of core commerce GiftWithPurchaseFormHandler.
Field Summary | |
---|---|
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 StoreInventoryManager |
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
|
Fields inherited from class atg.commerce.promotion.GiftWithPurchaseFormHandler |
---|
mCommerceItemType, mCurrentSelectedItemId, mExtraParameters, mGiftHashCode, mGwpManager, mMakeGiftSelectionErrorURL, mMakeGiftSelectionSuccessURL, mProductId, mPromotionId, mQuantity, mRemoveAllSelectableQuantityErrorURL, mRemoveAllSelectableQuantitySuccessURL, mRemoveSelectableQuantityErrorURL, mRemoveSelectableQuantitySuccessURL, mReplaceFailedQuantity, mReplaceRemovedQuantity, mSelectableQuantityToRemove, MSG_ERROR_MAKE_GIFT_SELECTION, MSG_ERROR_REMOVE_SELECTABLE_QUANTITY, mShippingGroup, mSiteId, mSkuId |
Fields inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler |
---|
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUE |
Fields inherited from class atg.droplet.GenericFormHandler |
---|
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS |
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 | |
---|---|
StoreGiftWithPurchaseFormHandler()
|
Method Summary | |
---|---|
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()
|
StoreInventoryManager |
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(StoreInventoryManager 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. |
Methods inherited from class atg.commerce.promotion.GiftWithPurchaseFormHandler |
---|
getCatalogKey, getCommerceItemType, getCurrentSelectedItemId, getExtraParameters, getGiftHashCode, getGwpManager, getMakeGiftSelectionErrorURL, getMakeGiftSelectionSuccessURL, getPricingContext, getProductId, getPromotionId, getQuantity, getRemoveAllSelectableQuantityErrorURL, getRemoveAllSelectableQuantitySuccessURL, getRemoveSelectableQuantityErrorURL, getRemoveSelectableQuantitySuccessURL, getReplaceFailedQuantity, getReplaceRemovedQuantity, getSelectableQuantityToRemove, getShippingGroup, getSiteId, getSkuId, handleRemoveAllSelectableQuantity, handleRemoveSelectableQuantity, makeGiftSelection, postMakeGiftSelection, postRemoveAllSelectableQuantity, postRemoveSelectableQuantity, preRemoveAllSelectableQuantity, preRemoveSelectableQuantity, removeAllSelectableQuantity, removeSelectableQuantity, setCommerceItemType, setCurrentSelectedItemId, setExtraParameters, setGiftHashCode, setGwpManager, setMakeGiftSelectionErrorURL, setMakeGiftSelectionSuccessURL, setProductId, setPromotionId, setQuantity, setRemoveAllSelectableQuantityErrorURL, setRemoveAllSelectableQuantitySuccessURL, setRemoveSelectableQuantityErrorURL, setRemoveSelectableQuantitySuccessURL, setReplaceFailedQuantity, setReplaceRemovedQuantity, setSelectableQuantityToRemove, setShippingGroup, setSiteId, setSkuId, updateOrder |
Methods inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler |
---|
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 |
Methods inherited from class atg.droplet.GenericFormHandler |
---|
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 |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
Methods inherited from class atg.nucleus.GenericService |
---|
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 |
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
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 StoreInventoryManager mInventoryManager
protected StoreProfileTools mProfileTools
Constructor Detail |
---|
public StoreGiftWithPurchaseFormHandler()
Method Detail |
---|
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 StoreInventoryManager getInventoryManager()
public void setInventoryManager(StoreInventoryManager 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |