public class GiftWithPurchaseFormHandler extends PurchaseProcessFormHandler
GenericFormHandler
,
PurchaseProcessFormHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
protected java.lang.String |
mCommerceItemType |
protected java.lang.String |
mCurrentSelectedItemId |
protected java.util.Map |
mExtraParameters |
protected int |
mGiftHashCode |
protected GWPManager |
mGwpManager |
protected java.lang.String |
mMakeGiftSelectionErrorURL |
protected java.lang.String |
mMakeGiftSelectionSuccessURL |
protected java.lang.String |
mProductId |
protected java.lang.String |
mPromotionId |
protected long |
mQuantity |
protected double |
mQuantityWithFraction |
protected java.lang.String |
mRemoveAllSelectableQuantityErrorURL |
protected java.lang.String |
mRemoveAllSelectableQuantitySuccessURL |
protected java.lang.String |
mRemoveSelectableQuantityErrorURL |
protected java.lang.String |
mRemoveSelectableQuantitySuccessURL |
protected boolean |
mReplaceFailedQuantity |
protected boolean |
mReplaceRemovedQuantity |
protected long |
mSelectableQuantityToRemove |
protected double |
mSelectableQuantityWithFractionToRemove |
static java.lang.String |
MSG_ERROR_MAKE_GIFT_SELECTION |
static java.lang.String |
MSG_ERROR_REMOVE_SELECTABLE_QUANTITY |
protected ShippingGroup |
mShippingGroup |
protected java.lang.String |
mSiteId |
protected java.lang.String |
mSkuId |
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUE
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
SERVICE_INFO_KEY
DEFAULT_LOG_TRACE_STATUS
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
Constructor and Description |
---|
GiftWithPurchaseFormHandler() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getCatalogKey(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Get a string that will be used to identify the catalog to use when obtaining
a catalogRef and productRef for the creation of a commerce item.
|
java.lang.String |
getCommerceItemType()
Returns the default item type for added commerce items
|
java.lang.String |
getCurrentSelectedItemId()
Getter for the current selected item id.
|
java.util.Map |
getExtraParameters()
Getter for the extra parameters map
|
int |
getGiftHashCode()
Getter for the gift hash code.
|
GWPManager |
getGwpManager()
Returns property GwpManager
|
java.lang.String |
getMakeGiftSelectionErrorURL()
Returns property MakeGiftSelectionErrorURL
|
java.lang.String |
getMakeGiftSelectionSuccessURL()
Returns property MakeGiftSelectionSuccessURL
|
protected PricingContext |
getPricingContext(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Gets a pricing context to work with.
|
java.lang.String |
getProductId()
Getter for the Product id.
|
java.lang.String |
getPromotionId()
Getter for the promotion id.
|
long |
getQuantity()
Getter for the quantity.
|
double |
getQuantityWithFraction()
Getter for the quantity.
|
java.lang.String |
getRemoveAllSelectableQuantityErrorURL()
Returns property RemoveAllSelectableQuantityErrorURL
|
java.lang.String |
getRemoveAllSelectableQuantitySuccessURL()
Returns property RemoveAllSelectableQuantitySuccessURL
|
java.lang.String |
getRemoveSelectableQuantityErrorURL()
Returns property RemoveSelectableQuantityErrorURL
|
java.lang.String |
getRemoveSelectableQuantitySuccessURL()
Returns property RemoveSelectableQuantitySuccessURL
|
boolean |
getReplaceFailedQuantity()
Returns the flag whether a new selection should replace failed quantity
|
boolean |
getReplaceRemovedQuantity()
Returns the flag whether a new selection should replace removed quantity
|
long |
getSelectableQuantityToRemove()
Getter for the selectableQuantityToRemove.
|
double |
getSelectableQuantityWithFractionToRemove()
Getter for the selectableQuantityWithFractionToRemove.
|
ShippingGroup |
getShippingGroup()
Returns property ShippingGroup.
|
java.lang.String |
getSiteId()
Returns property SiteId
|
java.lang.String |
getSkuId()
Getter for the SKU id.
|
boolean |
handleMakeGiftSelection(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse) |
boolean |
handleRemoveAllSelectableQuantity(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Removes all available gift place holders.
|
boolean |
handleRemoveSelectableQuantity(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Handle method to remove selectable quantity.
|
protected void |
makeGiftSelection(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Method to make a single gift selection or change an existing selection.
|
void |
postMakeGiftSelection(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after all work is done by the handleMakeGiftSelection method.
|
void |
postRemoveAllSelectableQuantity(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after all work is done by the handleRemoveAllSelectableQuantity method.
|
void |
postRemoveSelectableQuantity(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called after all work is done by the handleRemoveSelectableQuantity method.
|
void |
preMakeGiftSelection(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any work is done by the handleMakeGiftSelection method.
|
void |
preRemoveAllSelectableQuantity(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any work is done by the handleRemoveAllSelectableQuantity method.
|
void |
preRemoveSelectableQuantity(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called before any work is done by the handleRemoveSelectableQuantity method.
|
protected void |
removeAllSelectableQuantity(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Method to remove all selectable quantity, i.e.
|
protected void |
removeSelectableQuantity(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Method to remove selectable quantity, e.g.
|
void |
setCommerceItemType(java.lang.String pCommerceItemType)
Sets the default item type for added commerce items
|
void |
setCurrentSelectedItemId(java.lang.String pCurrentSelectedItemId)
Setter for the current selected item id.
|
void |
setExtraParameters(java.util.Map pExtraParameters)
Setter for the extra parameters
|
void |
setGiftHashCode(int pGiftHashCode)
Setter for the gift hash code.
|
void |
setGwpManager(GWPManager pGwpManager)
Sets property mGwpManager
|
void |
setMakeGiftSelectionErrorURL(java.lang.String pMakeGiftSelectionErrorURL)
Sets property MakeGiftSelectionErrorURL
|
void |
setMakeGiftSelectionSuccessURL(java.lang.String pMakeGiftSelectionSuccessURL)
Sets property MakeGiftSelectionSuccessURL
|
void |
setProductId(java.lang.String pProductId)
Setter for the Product id.
|
void |
setPromotionId(java.lang.String pPromotionId)
Setter for the promotion id.
|
void |
setQuantity(long pQuantity)
Setter for the quantity.
|
void |
setQuantityWithFraction(double pQuantityWithFraction)
Setter for the quantity.
|
void |
setRemoveAllSelectableQuantityErrorURL(java.lang.String pRemoveAllSelectableQuantityErrorURL)
Sets property RemoveAllSelectableQuantityErrorURL
|
void |
setRemoveAllSelectableQuantitySuccessURL(java.lang.String pRemoveAllSelectableQuantitySuccessURL)
Sets property RemoveAllSelectableQuantitySuccessURL
|
void |
setRemoveSelectableQuantityErrorURL(java.lang.String pRemoveSelectableQuantityErrorURL)
Sets property RemoveSelectableQuantityErrorURL
|
void |
setRemoveSelectableQuantitySuccessURL(java.lang.String pRemoveSelectableQuantitySuccessURL)
Sets property RemoveSelectableQuantitySuccessURL
|
void |
setReplaceFailedQuantity(boolean pReplaceFailedQuantity)
Sets the flag whether a new selection should replace failed quantity
|
void |
setReplaceRemovedQuantity(boolean pReplaceRemovedQuantity)
Sets the flag whether a new selection should replace removed quantity
|
void |
setSelectableQuantityToRemove(long pSelectableQuantityToRemove)
Setter for the selectableQuantityToRemove.
|
void |
setSelectableQuantityWithFractionToRemove(double pSelectableQuantityWithFractionToRemove)
Setter for the selectableQuantityWithFractionToRemove.
|
void |
setShippingGroup(ShippingGroup pShippingGroup)
Sets shipping group bean to use for modifying the shipping groups
|
void |
setSiteId(java.lang.String pSiteId)
Sets property SiteId
|
void |
setSkuId(java.lang.String pSkuId)
Setter for the SKU id.
|
protected void |
updateOrder(Order pOrder,
java.lang.String pMsgId,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to update an order and process any exception
that happens during the update.
|
acquireTransactionLock, acquireTransactionLock, afterSet, beforeSet, checkFormRedirect, 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
afterGet, beforeGet
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
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_MAKE_GIFT_SELECTION
public static final java.lang.String MSG_ERROR_REMOVE_SELECTABLE_QUANTITY
protected java.lang.String mMakeGiftSelectionSuccessURL
protected java.lang.String mMakeGiftSelectionErrorURL
protected GWPManager mGwpManager
protected java.lang.String mPromotionId
protected int mGiftHashCode
protected java.lang.String mCurrentSelectedItemId
protected java.lang.String mProductId
protected java.lang.String mSkuId
protected long mQuantity
protected double mQuantityWithFraction
protected ShippingGroup mShippingGroup
protected java.lang.String mCommerceItemType
protected boolean mReplaceRemovedQuantity
protected boolean mReplaceFailedQuantity
protected java.lang.String mSiteId
protected java.util.Map mExtraParameters
protected java.lang.String mRemoveSelectableQuantitySuccessURL
protected java.lang.String mRemoveSelectableQuantityErrorURL
protected long mSelectableQuantityToRemove
protected double mSelectableQuantityWithFractionToRemove
protected java.lang.String mRemoveAllSelectableQuantitySuccessURL
protected java.lang.String mRemoveAllSelectableQuantityErrorURL
public void setMakeGiftSelectionSuccessURL(java.lang.String pMakeGiftSelectionSuccessURL)
pMakeGiftSelectionSuccessURL
- a String
valuepublic java.lang.String getMakeGiftSelectionSuccessURL()
String
valuepublic void setMakeGiftSelectionErrorURL(java.lang.String pMakeGiftSelectionErrorURL)
pMakeGiftSelectionErrorURL
- a String
valuepublic java.lang.String getMakeGiftSelectionErrorURL()
String
valuepublic void setGwpManager(GWPManager pGwpManager)
pGwpManager
- GWPManagerpublic GWPManager getGwpManager()
public java.lang.String getPromotionId()
public void setPromotionId(java.lang.String pPromotionId)
pProductId
- String Product idpublic int getGiftHashCode()
public void setGiftHashCode(int pGiftHashCode)
pGiftHashCode
- int GiftHashCodepublic java.lang.String getCurrentSelectedItemId()
public void setCurrentSelectedItemId(java.lang.String pCurrentSelectedItemId)
pCurrentSelectedItemId
- String commerce item idpublic java.lang.String getProductId()
public void setProductId(java.lang.String pProductId)
pProductId
- String Product idpublic java.lang.String getSkuId()
public void setSkuId(java.lang.String pSkuId)
pSkuId
- String SKU idpublic long getQuantity()
public void setQuantity(long pQuantity)
pQuantity
- long quantitypublic double getQuantityWithFraction()
public void setQuantityWithFraction(double pQuantityWithFraction)
pQuantityWithFraction
- double quantitypublic void setShippingGroup(ShippingGroup pShippingGroup)
pShippingGroup
- a ShippingGroup
valuepublic ShippingGroup getShippingGroup()
ShippingGroup
valuepublic void setCommerceItemType(java.lang.String pCommerceItemType)
public java.lang.String getCommerceItemType()
public void setReplaceRemovedQuantity(boolean pReplaceRemovedQuantity)
public boolean getReplaceRemovedQuantity()
public void setReplaceFailedQuantity(boolean pReplaceFailedQuantity)
public boolean getReplaceFailedQuantity()
public void setSiteId(java.lang.String pSiteId)
pSiteId
- a String
valuepublic java.lang.String getSiteId()
String
valuepublic java.util.Map getExtraParameters()
public void setExtraParameters(java.util.Map pExtraParameters)
pExtraParameters
- Mapprotected java.lang.String getCatalogKey(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- servlet request objectpResponse
- servlet response objectjavax.servlet.ServletException
- if an error occursjava.io.IOException
- if an error occursCatalogTools
protected PricingContext getPricingContext(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- servlet request objectpResponse
- servlet response objectjavax.servlet.ServletException
java.io.IOException
protected void updateOrder(Order pOrder, java.lang.String pMsgId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pOrder
- the order to updatepMsgId
- the message ID to use in case of an exceptionpRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
valuejavax.servlet.ServletException
java.io.IOException
public void preMakeGiftSelection(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response objectjavax.servlet.ServletException
- if an error occursjava.io.IOException
- if an error occurspublic void postMakeGiftSelection(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response objectjavax.servlet.ServletException
- if an error occursjava.io.IOException
- if an error occurspublic boolean handleMakeGiftSelection(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
protected void makeGiftSelection(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet iopublic void setRemoveSelectableQuantitySuccessURL(java.lang.String pRemoveSelectableQuantitySuccessURL)
pRemoveSelectableQuantitySuccessURL
- a String
valuepublic java.lang.String getRemoveSelectableQuantitySuccessURL()
String
valuepublic void setRemoveSelectableQuantityErrorURL(java.lang.String pRemoveSelectableQuantityErrorURL)
pRemoveSelectableQuantityErrorURL
- a String
valuepublic java.lang.String getRemoveSelectableQuantityErrorURL()
String
valuepublic long getSelectableQuantityToRemove()
public void setSelectableQuantityToRemove(long pSelectableQuantityToRemove)
pQuantity
- long selectableQuantityToRemovepublic double getSelectableQuantityWithFractionToRemove()
public void setSelectableQuantityWithFractionToRemove(double pSelectableQuantityWithFractionToRemove)
pQuantity
- double selectableQuantityWithFractionToRemovepublic void preRemoveSelectableQuantity(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response objectjavax.servlet.ServletException
- if an error occursjava.io.IOException
- if an error occurspublic void postRemoveSelectableQuantity(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response objectjavax.servlet.ServletException
- if an error occursjava.io.IOException
- if an error occurspublic boolean handleRemoveSelectableQuantity(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- DynamoHttpServletRequestpResponse
- DynamoHttpServletResponsejavax.servlet.ServletException
java.io.IOException
protected void removeSelectableQuantity(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet iopublic void setRemoveAllSelectableQuantitySuccessURL(java.lang.String pRemoveAllSelectableQuantitySuccessURL)
pRemoveAllSelectableQuantitySuccessURL
- a String
valuepublic java.lang.String getRemoveAllSelectableQuantitySuccessURL()
String
valuepublic void setRemoveAllSelectableQuantityErrorURL(java.lang.String pRemoveAllSelectableQuantityErrorURL)
pRemoveAllSelectableQuantityErrorURL
- a String
valuepublic java.lang.String getRemoveAllSelectableQuantityErrorURL()
String
valuepublic boolean handleRemoveAllSelectableQuantity(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- pResponse
- javax.servlet.ServletException
java.io.IOException
public void preRemoveAllSelectableQuantity(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response objectjavax.servlet.ServletException
- if an error occursjava.io.IOException
- if an error occurspublic void postRemoveAllSelectableQuantity(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response objectjavax.servlet.ServletException
- if an error occursjava.io.IOException
- if an error occursprotected void removeAllSelectableQuantity(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's responsejavax.servlet.ServletException
- if there was an error while executing the codejava.io.IOException
- if there was an error with servlet IO