public class PurchaselistFormHandler extends PurchaselistFormHandlerSuper
GenericFormHandler
,
GiftlistFormHandler
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
ERR_DUPLICATE_LIST_NAME |
static java.lang.String |
ERR_NULL_LIST_NAME |
static java.lang.String |
ERR_UNABLE_TO_CREATE_LIST |
static java.lang.String |
EVENTNAME_PROPERTY |
static java.lang.String |
LIST_ID |
protected static java.lang.String |
sBundleName |
dateUtil, LOCALE_PARAM, mEnableSecurity, MSG_ERROR_ADDING_TO_GIFTLIST, MSG_ERROR_DELETING_GIFTLIST, MSG_ERROR_NO_SUCH_GIFTLIST, MSG_ERROR_REMOVING_RROM_GIFTLIST, MSG_ERROR_SAVING_GIFTLIST, MSG_ERROR_UPDATING_GIFTLIST_ITEMS, MSG_INVALID_EVENT_DATE, MSG_INVALID_GIFTLIST_QUANTITY, MSG_INVALID_GIFTLIST_QUANTITY_WITH_FRACTION, MSG_INVALID_QUANTITY, MSG_NO_GIFTLIST_TO_MODIFY, MSG_NO_ITEM_FOUND, MSG_NO_ITEMS_TO_ADD, MSG_NO_SKU_WITH_ID, MSG_QUANTITY_LESSTHAN_OR_EQUALTO_ZERO, MSG_QUANTITY_WITH_FRACTION_LESSTHAN_OR_EQUALTO_ZERO, MY_RESOURCE_NAME, QUANTITY_NOT_VALID, sResourceBundle
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 |
---|
PurchaselistFormHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
addFormException(java.lang.String pErrorKey,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Adds a form exception to the formhandler.
|
protected boolean |
checkForListName(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method checks for validity of purchase list name.
|
protected java.util.Locale |
getLocale(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns either the Locale from the Request object (if it isn't NULL),
or the Locale from the JVM.
|
java.lang.String |
getStringResource(java.lang.String pResourceName,
java.util.Locale pLocale)
This method acts as a utility method to obtain a given
resource for a particular key.
|
java.lang.String |
getUserLocale()
Return the userLocale property.
|
boolean |
handleAddItemToPurchaselist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
handleAddItemToPurchaseList is called when the user hits the submit
button on a product page to add an item to the purchase list.
|
boolean |
handleCreatePurchaselist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called when the customer selects create to create a new purchase list.
|
boolean |
handleDeletePurchaselist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called when the customer pushes delete giftlist.
|
boolean |
handleSavePurchaselist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called when the customer selects save purchaselist.
|
boolean |
handleUpdatePurchaselist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called when the customer selects update purchaselist.
|
void |
populateGiftListFields()
Since the purchase list feature relies on the atg.commerce.gifts package
in its implementation, this method is used to populate the individual fields of
a giftlist that are needed for manipulating giftlists, but which do not have any
direct relevance to the purchase list paradigm.
|
void |
setAddItemToPurchaselistErrorURL(java.lang.String pAddItemToPurchaselistErrorURL)
Sets property addItemToPurchaselistErrorURL
|
void |
setAddItemToPurchaselistSuccessURL(java.lang.String pAddItemToPurchaselistSuccessURL)
Sets property addItemToPurchaselistSuccessURL
|
void |
setCreatePurchaselistErrorURL(java.lang.String pCreatePurchaselistErrorURL)
Sets property createPurchaselistErrorURL
|
void |
setCreatePurchaselistSuccessURL(java.lang.String pCreatePurchaselistSuccessURL)
Sets property createPurchaselistSuccessURL
|
void |
setDeletePurchaselistErrorURL(java.lang.String pDeletePurchaselistErrorURL)
Sets property deletePurchaselistErrorURL
|
void |
setDeletePurchaselistSuccessURL(java.lang.String pDeletePurchaselistSuccessURL)
Sets property deletePurchaselistSuccessURL
|
void |
setListName(java.lang.String pListName)
Sets property listName
|
void |
setPurchaseListId(java.lang.String pPurchaseListId)
Sets property purchaseListId
|
void |
setSavePurchaselistErrorURL(java.lang.String pSavePurchaselistErrorURL)
Sets property savePurchaselistErrorURL
|
void |
setSavePurchaselistSuccessURL(java.lang.String pSavePurchaselistSuccessURL)
Sets property savePurchaselistSuccessURL
|
void |
setUpdatePurchaselistErrorURL(java.lang.String pUpdatePurchaselistErrorURL)
Sets property setUpdatePurchaselistErrorURL
|
void |
setUpdatePurchaselistItemsErrorURL(java.lang.String pUpdatePurchaselistItemsErrorURL)
Sets property updatePurchaselistItemsErrorURL
|
void |
setUpdatePurchaselistItemsSuccessURL(java.lang.String pUpdatePurchaselistItemsSuccessURL)
Sets property updatePurchaselistItemsSuccessURL
|
void |
setUpdatePurchaselistSuccessURL(java.lang.String pUpdatePurchaselistSuccessURL)
Sets property updatePurchaselistSuccessURL
|
void |
setUserLocale(java.lang.String pUserLocale)
Set the userLocale property.
|
copyPropertiesTo, equals, getAddItemToPurchaselistErrorURL, getAddItemToPurchaselistSuccessURL, getCreatePurchaselistErrorURL, getCreatePurchaselistSuccessURL, getDeletePurchaselistErrorURL, getDeletePurchaselistSuccessURL, getListName, getPurchaseListId, getSavePurchaselistErrorURL, getSavePurchaselistSuccessURL, getUpdatePurchaselistErrorURL, getUpdatePurchaselistItemsErrorURL, getUpdatePurchaselistItemsSuccessURL, getUpdatePurchaselistSuccessURL, hashCode, toString
addItemToGiftlist, checkGiftlistAccess, createGiftlist, createNewShippingAddress, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getAddItemToGiftlistErrorURL, getAddItemToGiftlistSuccessURL, getAddresses, getCatalogRefIds, getCatalogTools, getComments, getCreateGiftlistErrorURL, getCreateGiftlistSuccessURL, getDate, getDates, getDefaultLocale, getDeleteGiftlistErrorURL, getDeleteGiftlistSuccessURL, getDescription, getEventDate, getEventName, getEventType, getEventTypes, getGeneralFailureURL, getGeneralSuccessURL, getGiftlistId, getGiftlistManager, getGiftlistRepository, getInstructions, getIsNewAddress, getIsPublic, getIsPublished, getItemIds, getItemRemovedFromOrderEventType, getMonth, getMonths, getMoveItemsFromCartErrorURL, getMoveItemsFromCartSuccessURL, getNewAddress, getNewAddressName, getOrder, getOrderManager, getPipelineManager, getProductId, getProfile, getProfileTools, getQuantity, getQuantity, getQuantityWithFraction, getQuantityWithFraction, getRemoveGiftitemIds, getSaveGiftlistErrorURL, getSaveGiftlistSuccessURL, getShippingAddressId, getShoppingCart, getSiteId, getSpecialInstructions, getUpdateGiftlistErrorURL, getUpdateGiftlistItemsErrorURL, getUpdateGiftlistItemsSuccessURL, getUpdateGiftlistSuccessURL, getUserLocale, getYear, getYears, handleAddItemToGiftlist, handleCreateGiftlist, handleDeleteGiftlist, handleMoveItemsFromCart, handlePipelineError, handleSaveGiftlist, handleUpdateGiftlist, handleUpdateGiftlistItems, isEnableSecurity, isSendItemRemovedMessages, isUseRequestLocale, moveItemsFromCart, postAddItemToGiftlist, postCreateGiftlist, postDeleteGiftlist, postMoveItemsFromCart, postSaveGiftlist, postUpdateGiftlist, postUpdateGiftlistItems, preAddItemToGiftlist, preCreateGiftlist, preDeleteGiftlist, preMoveItemsFromCart, preSaveGiftlist, preUpdateGiftlist, preUpdateGiftlistItems, processException, processPipelineErrors, saveGiftlist, sendScenarioEvent, sendScenarioEvent, sendScenarioEvent, setAddItemToGiftlistErrorURL, setAddItemToGiftlistSuccessURL, setCatalogRefIds, setCatalogTools, setComments, setCreateGiftlistErrorURL, setCreateGiftlistSuccessURL, setDate, setDefaultLocale, setDeleteGiftlistErrorURL, setDeleteGiftlistSuccessURL, setDescription, setEnableSecurity, setEventDate, setEventName, setEventType, setGeneralFailureURL, setGeneralSuccessURL, setGiftlistId, setGiftlistManager, setGiftlistRepository, setInstructions, setIsNewAddress, setIsPublic, setIsPublished, setItemIds, setItemRemovedFromOrderEventType, setMonth, setMoveItemsFromCartErrorURL, setMoveItemsFromCartSuccessURL, setNewAddress, setNewAddressName, setOrderManager, setPipelineManager, setProductId, setProfile, setProfileTools, setQuantity, setQuantityWithFraction, setRemoveGiftitemIds, setSaveGiftlistErrorURL, setSaveGiftlistSuccessURL, setSendItemRemovedMessages, setShippingAddressId, setShoppingCart, setSiteId, setSpecialInstructions, setUpdateGiftlistErrorURL, setUpdateGiftlistItemsErrorURL, setUpdateGiftlistItemsSuccessURL, setUpdateGiftlistSuccessURL, setUseRequestLocale, setYear, updateEventDate, updateGiftlist, updateGiftlistItems, updateOrder, updateOrder, validateGiftlistId
afterSet, beforeSet, checkFormRedirect, commitTransaction, getTransactionDemarcation, getTransactionStatus, isEnsureTransaction, isRollbackTransaction, isRollbackTransactionOnUnhandledException, isTransactionMarkedAsRollback, setEnsureTransaction, setRollbackTransaction, setRollbackTransactionOnUnhandledException, setTransactionDemarcation
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, 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
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
public static java.lang.String CLASS_VERSION
public static final java.lang.String LIST_ID
public static final java.lang.String EVENTNAME_PROPERTY
protected static java.lang.String sBundleName
public static final java.lang.String ERR_NULL_LIST_NAME
public static final java.lang.String ERR_DUPLICATE_LIST_NAME
public static final java.lang.String ERR_UNABLE_TO_CREATE_LIST
public void setPurchaseListId(java.lang.String pPurchaseListId)
setPurchaseListId
in class PurchaselistFormHandlerSuper
pPurchaseListId
- The property to store the purchase list IDpublic void setCreatePurchaselistSuccessURL(java.lang.String pCreatePurchaselistSuccessURL)
setCreatePurchaselistSuccessURL
in class PurchaselistFormHandlerSuper
pCreatePurchaselistSuccessURL
- The property to store the createPurchaselistSuccessURLpublic void setCreatePurchaselistErrorURL(java.lang.String pCreatePurchaselistErrorURL)
setCreatePurchaselistErrorURL
in class PurchaselistFormHandlerSuper
pCreatePurchaselistErrorURL
- The property to store the createPurchaselistErrorURLpublic void setSavePurchaselistSuccessURL(java.lang.String pSavePurchaselistSuccessURL)
setSavePurchaselistSuccessURL
in class PurchaselistFormHandlerSuper
pSavePurchaselistSuccessURL
- The property to store the savePurchaselistSuccessURLpublic void setSavePurchaselistErrorURL(java.lang.String pSavePurchaselistErrorURL)
setSavePurchaselistErrorURL
in class PurchaselistFormHandlerSuper
pSavePurchaselistErrorURL
- The property to store the savePurchaselistErrorURLpublic void setUpdatePurchaselistSuccessURL(java.lang.String pUpdatePurchaselistSuccessURL)
setUpdatePurchaselistSuccessURL
in class PurchaselistFormHandlerSuper
pUpdatePurchaselistSuccessURL
- The property to store the updatePurchaselistSuccessURLpublic void setUpdatePurchaselistErrorURL(java.lang.String pUpdatePurchaselistErrorURL)
setUpdatePurchaselistErrorURL
in class PurchaselistFormHandlerSuper
pUpdatePurchaselistErrorURL
- The property to store the setUpdatePurchaselistErrorURLpublic void setUpdatePurchaselistItemsSuccessURL(java.lang.String pUpdatePurchaselistItemsSuccessURL)
setUpdatePurchaselistItemsSuccessURL
in class PurchaselistFormHandlerSuper
pUpdatePurchaselistItemsSuccessURL
- The property to store the updatePurchaselistItemsSuccessURLpublic void setUpdatePurchaselistItemsErrorURL(java.lang.String pUpdatePurchaselistItemsErrorURL)
setUpdatePurchaselistItemsErrorURL
in class PurchaselistFormHandlerSuper
pUpdatePurchaselistItemsErrorURL
- The property to store the updatePurchaselistItemsErrorURLpublic void setDeletePurchaselistSuccessURL(java.lang.String pDeletePurchaselistSuccessURL)
setDeletePurchaselistSuccessURL
in class PurchaselistFormHandlerSuper
pDeletePurchaselistSuccessURL
- The property to store the deletePurchaselistSuccessURLpublic void setDeletePurchaselistErrorURL(java.lang.String pDeletePurchaselistErrorURL)
setDeletePurchaselistErrorURL
in class PurchaselistFormHandlerSuper
pDeletePurchaselistErrorURL
- The property to store the deletePurchaselistErrorURLpublic void setAddItemToPurchaselistSuccessURL(java.lang.String pAddItemToPurchaselistSuccessURL)
setAddItemToPurchaselistSuccessURL
in class PurchaselistFormHandlerSuper
pAddItemToPurchaselistSuccessURL
- The property to store the addItemToPurchaselistSuccessURLpublic void setAddItemToPurchaselistErrorURL(java.lang.String pAddItemToPurchaselistErrorURL)
setAddItemToPurchaselistErrorURL
in class PurchaselistFormHandlerSuper
pAddItemToPurchaselistErrorURL
- The property to store the addItemToPurchaselistErrorURLpublic void setListName(java.lang.String pListName)
setListName
in class PurchaselistFormHandlerSuper
pListName
- The property to store the listNamepublic java.lang.String getUserLocale()
public void setUserLocale(java.lang.String pUserLocale)
pUserLocale
- public boolean handleAddItemToPurchaselist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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 ioCommerceException
- if there was an error with CommerceGiftListFormHandler#handleAddItemToGiftlist
public boolean handleCreatePurchaselist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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 ioCommerceException
- if there was an error with Commercepublic boolean handleSavePurchaselist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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 ioCommerceException
- if there was an error with CommerceGiftlistFormHandler#handleSaveGiftList
public boolean handleDeletePurchaselist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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 ioCommerceException
- if there was an error with Commercepublic boolean handleUpdatePurchaselist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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 ioCommerceException
- if there was an error with Commercepublic void populateGiftListFields()
protected boolean checkForListName(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
protected java.util.Locale getLocale(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pRequest
- the servlet's requestprotected void addFormException(java.lang.String pErrorKey, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pErrorKey
to obtain a resource using the getStringResource
method.addFormException
in class GiftlistFormHandler
pErrorKey
- the resource keypRequest
- a DynamoHttpServletRequest
valuepResponse
- a DynamoHttpServletResponse
valuepublic java.lang.String getStringResource(java.lang.String pResourceName, java.util.Locale pLocale)
pResourceName
- the resource key used to obtain the resourcepLocale
- the users locale for which the resource bundle will be
obtained.