|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.droplet.EmptyFormHandler atg.droplet.GenericFormHandler atg.commerce.order.purchase.PurchaseProcessFormHandler atg.commerce.promotion.GiftWithPurchaseFormHandler
public class GiftWithPurchaseFormHandler
This formhandler is used to make a gift selection for a gift with purchase promotion.
GenericFormHandler
,
PurchaseProcessFormHandler
Field Summary | |
---|---|
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 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
|
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
|
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 | |
---|---|
GiftWithPurchaseFormHandler()
|
Method Summary | |
---|---|
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. |
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. |
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 |
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 |
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. |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
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_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 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 java.lang.String mRemoveAllSelectableQuantitySuccessURL
protected java.lang.String mRemoveAllSelectableQuantityErrorURL
Constructor Detail |
---|
public GiftWithPurchaseFormHandler()
Method Detail |
---|
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 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 object
javax.servlet.ServletException
- if an error occurs
java.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 object
javax.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
value
javax.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 object
javax.servlet.ServletException
- if an error occurs
java.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 object
javax.servlet.ServletException
- if an error occurs
java.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 void preRemoveSelectableQuantity(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the request objectpResponse
- the response object
javax.servlet.ServletException
- if an error occurs
java.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 object
javax.servlet.ServletException
- if an error occurs
java.io.IOException
- if an error occurspublic boolean handleRemoveSelectableQuantity(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- DynamoHttpServletRequestpResponse
- DynamoHttpServletResponse
javax.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 response
javax.servlet.ServletException
- if there was an error while executing the code
java.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 object
javax.servlet.ServletException
- if an error occurs
java.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 object
javax.servlet.ServletException
- if an error occurs
java.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 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 |