atg.projects.store.gifts
Class StoreGiftlistFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by atg.droplet.TransactionalFormHandler
                      extended by atg.commerce.gifts.GiftlistFormHandler
                          extended by atg.projects.store.gifts.StoreGiftlistFormHandler
All Implemented Interfaces:
atg.commerce.util.PipelineErrorHandler, atg.droplet.DropletFormHandler, atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

public class StoreGiftlistFormHandler
extends atg.commerce.gifts.GiftlistFormHandler

Extensions to the atg.commerce.gifts.GiftlistFormHandler.

Version:
$Id: //hosting-blueprint/B2CBlueprint/version/10.2/EStore/src/atg/projects/store/gifts/StoreGiftlistFormHandler.java#3 $
Author:
ATG
See Also:
GiftlistFormHandler

Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
protected static java.lang.String GIFT_LIST_DATE_MAP_KEY
           
protected static java.lang.String GIFT_LIST_DESCRIPTION_MAP_KEY
           
protected static java.lang.String GIFT_LIST_EVENT_NAME_MAP_KEY
           
protected static java.lang.String GIFT_LIST_EVENT_TYPE_MAP_KEY
           
protected static java.lang.String GIFT_LIST_INSTRUCTIONS_MAP_KEY
           
protected static java.lang.String GIFT_LIST_MONTH_MAP_KEY
           
static java.lang.String GIFT_LIST_NOT_LOGGED_IN
           
protected static java.lang.String GIFT_LIST_PUBLISHED_MAP_KEY
           
protected static java.lang.String GIFT_LIST_SHIPPING_ADDRESS_MAP_KEY
           
protected static java.lang.String GIFT_LIST_YEAR_MAP_KEY
           
protected static java.lang.String GIFT_LISTS_PROPERTY
           
static java.lang.String GIFTLIST_ID
          Gift list id constant.
protected  java.lang.String mAddItemToGiftlistLoginURL
          property: addItemToGiftlistLoginURL
protected  atg.commerce.gifts.GiftlistSiteFilter mGiftlistSiteFilter
          property: giftlistSiteFilter
protected  java.lang.String mMoveItemsFromCartLoginURL
          property: moveItemsFromCartLoginURL
protected  atg.userprofiling.PropertyManager mProfilePropertyManager
          property: profilePropertyManager
protected  java.lang.String mRemoveItemsFromGiftlistErrorURL
          property: removeItemsFromGiftlistErrorURL
protected  java.lang.String mRemoveItemsFromGiftlistSuccessURL
          property: removeItemsFromGiftlistSuccessURL
static java.lang.String MSG_DUPLICATE_EVENT_NAME
           
static java.lang.String MSG_ERROR_LONG_DESCRIPTION
           
static java.lang.String MSG_ERROR_LONG_SPECIAL_INSTRUCTIONS
           
static java.lang.String MSG_INVALID_DATE
           
static java.lang.String PRODUCT_ID
          Product id constant.
static java.lang.String QUANTITY
          Quantity constant.
static java.lang.String SKU_ID
          Sku id constant.
static java.lang.String SUCCESS_URL
          Success URL constant.
static java.lang.String WISH_LIST_NOT_LOGGED_IN
           
 
Fields inherited from class atg.commerce.gifts.GiftlistFormHandler
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_NO_GIFTLIST_TO_MODIFY, MSG_NO_ITEM_FOUND, MSG_NO_ITEMS_TO_ADD, MSG_NO_SKU_WITH_ID, MSG_QUANTITY_LESSTHAN_OR_EQUALTO_ZERO, MY_RESOURCE_NAME, QUANTITY_NOT_VALID, sResourceBundle
 
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
StoreGiftlistFormHandler()
           
 
Method Summary
protected  void addLoginErrorParameter(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Adds 'error' query parameter to the request with the resource key to the error message that should be displayed on the login page.
 void clearForm()
          Clears the form handler property values.
 java.lang.String getAddItemToGiftlistLoginURL()
           
 atg.service.util.CurrentDate getCurrentDate()
          Gets the CurrentDate component.
 atg.commerce.gifts.GiftlistSiteFilter getGiftlistSiteFilter()
           
 java.lang.String getMoveItemsFromCartLoginURL()
           
 java.lang.String getMoveToNewGiftListAddressErrorURL()
           
 java.lang.String getMoveToNewGiftListAddressSuccessURL()
          Returns property MoveToNewGiftListAddressSuccessURL.
 atg.userprofiling.PropertyManager getProfilePropertyManager()
           
 java.lang.String getRemoveItemsFromGiftlistErrorURL()
           
 java.lang.String getRemoveItemsFromGiftlistSuccessURL()
           
 SessionBean getSessionBean()
           
 java.lang.String getUnmodifiedEventName()
           
 java.lang.String getUpdateGiftlistAndItemsErrorURL()
           
 java.lang.String getUpdateGiftlistAndItemsSuccessURL()
          Returns property UpdateGiftlistAndItemsSuccessURL.
 boolean handleCancel(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Clears form errors as part of the cancel operation.
 boolean handleInitializeGiftListForm(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Initializes Gift list form with previously entered data stored in the session-scoped component.
 boolean handleMoveToNewGiftListAddress(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Stores entered by user data to the sessions-scoped component before moving to Add New Address URL.
 boolean handleRemoveItemsFromGiftlist(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          HandleRemoveItemsFromGiftlist is called when the user hits the "delete" button on the wish list page.
 boolean handleUpdateGiftlistAndItems(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          The combined handler that allows to update gift list and its items at the same time.
 void postMoveItemsFromCart(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Operation called just after an item has been moved from shopping cart.
 void postRemoveItemsFromGiftlist(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Operation called just after items are removed from a a gift list.
 void postSaveGiftlist(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Overrides base method to clear the form after the new gift list has been successfully saved.
 void postUpdateGiftlistAndItems(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Operation called just after a gift list and gift items are updated.
 void preAddItemToGiftlist(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Before adding an item to the giftlist validate quantity and SKU ID, also check if user is explicitly logged in.
 void preMoveItemsFromCart(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Before moving item to the gift list check if user is explicitly logged in.
 void preRemoveItemsFromGiftlist(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Operation called just before items are removed from a a gift list.
 void preSaveGiftlist(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Calls validatation of event name
 void preUpdateGiftlistAndItems(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Operation called just before a gift list and gift items are updated.
protected  void removeItemsFromGiftlist(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Removes the given items to the selected gift list.
 void setAddItemToGiftlistLoginURL(java.lang.String pAddItemToGiftlistLoginURL)
           
 void setCurrentDate(atg.service.util.CurrentDate pCurrentDate)
          Sets the CurrentDate component.
 void setGiftlist(atg.repository.RepositoryItem pGiftlist)
          Initializes all the form values from the provided gift list.
 void setGiftlistSiteFilter(atg.commerce.gifts.GiftlistSiteFilter pGiftlistSiteFilter)
           
 void setMoveItemsFromCartLoginURL(java.lang.String pMoveItemsFromCartLoginURL)
           
 void setMoveToNewGiftListAddressErrorURL(java.lang.String pMoveToNewGiftListAddressErrorURL)
           
 void setMoveToNewGiftListAddressSuccessURL(java.lang.String pMoveToNewGiftListAddressSuccessURL)
           
 void setProfilePropertyManager(atg.userprofiling.PropertyManager pProfilePropertyManager)
           
 void setRemoveItemsFromGiftlistErrorURL(java.lang.String pRemoveItemsFromGiftlistErrorURL)
           
 void setRemoveItemsFromGiftlistSuccessURL(java.lang.String pRemoveItemsFromGiftlistSuccessURL)
           
 void setSessionBean(SessionBean pSessionBean)
           
 void setUnmodifiedEventName(java.lang.String pUnmodifiedEventName)
           
 void setUpdateGiftlistAndItemsErrorURL(java.lang.String pUpdateGiftlistAndItemsErrorURL)
           
 void setUpdateGiftlistAndItemsSuccessURL(java.lang.String pUpdateGiftlistAndItemsSuccessURL)
           
 void storeNewGiftListData()
          Stores entered by user data to the session-scoped component.
protected  void updateOrder(atg.commerce.order.CommerceItem pItem, long pQuantity, atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          Will update the quantity of the commerceItem passed in.
protected  void validateEventName(java.lang.String pEventName, atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse)
          This method validates event name.
 
Methods inherited from class atg.commerce.gifts.GiftlistFormHandler
addFormException, 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, 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, postUpdateGiftlist, postUpdateGiftlistItems, preCreateGiftlist, preDeleteGiftlist, preUpdateGiftlist, preUpdateGiftlistItems, processException, processPipelineErrors, saveGiftlist, 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, setRemoveGiftitemIds, setSaveGiftlistErrorURL, setSaveGiftlistSuccessURL, setSendItemRemovedMessages, setShippingAddressId, setShoppingCart, setSiteId, setSpecialInstructions, setUpdateGiftlistErrorURL, setUpdateGiftlistItemsErrorURL, setUpdateGiftlistItemsSuccessURL, setUpdateGiftlistSuccessURL, setUseRequestLocale, setYear, updateEventDate, updateGiftlist, updateGiftlistItems, validateGiftlistId
 
Methods inherited from class atg.droplet.TransactionalFormHandler
afterSet, beforeSet, checkFormRedirect, commitTransaction, getTransactionDemarcation, getTransactionStatus, isEnsureTransaction, isRollbackTransaction, isRollbackTransactionOnUnhandledException, isTransactionMarkedAsRollback, setEnsureTransaction, setRollbackTransaction, setRollbackTransactionOnUnhandledException, setTransactionDemarcation
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, 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, 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
 
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

GIFT_LIST_EVENT_NAME_MAP_KEY

protected static final java.lang.String GIFT_LIST_EVENT_NAME_MAP_KEY
See Also:
Constant Field Values

GIFT_LIST_MONTH_MAP_KEY

protected static final java.lang.String GIFT_LIST_MONTH_MAP_KEY
See Also:
Constant Field Values

GIFT_LIST_DATE_MAP_KEY

protected static final java.lang.String GIFT_LIST_DATE_MAP_KEY
See Also:
Constant Field Values

GIFT_LIST_YEAR_MAP_KEY

protected static final java.lang.String GIFT_LIST_YEAR_MAP_KEY
See Also:
Constant Field Values

GIFT_LIST_SHIPPING_ADDRESS_MAP_KEY

protected static final java.lang.String GIFT_LIST_SHIPPING_ADDRESS_MAP_KEY
See Also:
Constant Field Values

GIFT_LIST_EVENT_TYPE_MAP_KEY

protected static final java.lang.String GIFT_LIST_EVENT_TYPE_MAP_KEY
See Also:
Constant Field Values

GIFT_LIST_PUBLISHED_MAP_KEY

protected static final java.lang.String GIFT_LIST_PUBLISHED_MAP_KEY
See Also:
Constant Field Values

GIFT_LIST_DESCRIPTION_MAP_KEY

protected static final java.lang.String GIFT_LIST_DESCRIPTION_MAP_KEY
See Also:
Constant Field Values

GIFT_LIST_INSTRUCTIONS_MAP_KEY

protected static final java.lang.String GIFT_LIST_INSTRUCTIONS_MAP_KEY
See Also:
Constant Field Values

GIFT_LISTS_PROPERTY

protected static final java.lang.String GIFT_LISTS_PROPERTY
See Also:
Constant Field Values

MSG_INVALID_DATE

public static final java.lang.String MSG_INVALID_DATE
See Also:
Constant Field Values

MSG_ERROR_LONG_DESCRIPTION

public static final java.lang.String MSG_ERROR_LONG_DESCRIPTION
See Also:
Constant Field Values

MSG_ERROR_LONG_SPECIAL_INSTRUCTIONS

public static final java.lang.String MSG_ERROR_LONG_SPECIAL_INSTRUCTIONS
See Also:
Constant Field Values

MSG_DUPLICATE_EVENT_NAME

public static final java.lang.String MSG_DUPLICATE_EVENT_NAME
See Also:
Constant Field Values

GIFT_LIST_NOT_LOGGED_IN

public static final java.lang.String GIFT_LIST_NOT_LOGGED_IN
See Also:
Constant Field Values

WISH_LIST_NOT_LOGGED_IN

public static final java.lang.String WISH_LIST_NOT_LOGGED_IN
See Also:
Constant Field Values

CLASS_VERSION

public static final java.lang.String CLASS_VERSION
Class version string.

See Also:
Constant Field Values

GIFTLIST_ID

public static final java.lang.String GIFTLIST_ID
Gift list id constant.

See Also:
Constant Field Values

SUCCESS_URL

public static final java.lang.String SUCCESS_URL
Success URL constant.

See Also:
Constant Field Values

SKU_ID

public static final java.lang.String SKU_ID
Sku id constant.

See Also:
Constant Field Values

QUANTITY

public static final java.lang.String QUANTITY
Quantity constant.

See Also:
Constant Field Values

PRODUCT_ID

public static final java.lang.String PRODUCT_ID
Product id constant.

See Also:
Constant Field Values

mGiftlistSiteFilter

protected atg.commerce.gifts.GiftlistSiteFilter mGiftlistSiteFilter
property: giftlistSiteFilter


mAddItemToGiftlistLoginURL

protected java.lang.String mAddItemToGiftlistLoginURL
property: addItemToGiftlistLoginURL


mMoveItemsFromCartLoginURL

protected java.lang.String mMoveItemsFromCartLoginURL
property: moveItemsFromCartLoginURL


mProfilePropertyManager

protected atg.userprofiling.PropertyManager mProfilePropertyManager
property: profilePropertyManager


mRemoveItemsFromGiftlistSuccessURL

protected java.lang.String mRemoveItemsFromGiftlistSuccessURL
property: removeItemsFromGiftlistSuccessURL


mRemoveItemsFromGiftlistErrorURL

protected java.lang.String mRemoveItemsFromGiftlistErrorURL
property: removeItemsFromGiftlistErrorURL

Constructor Detail

StoreGiftlistFormHandler

public StoreGiftlistFormHandler()
Method Detail

getGiftlistSiteFilter

public atg.commerce.gifts.GiftlistSiteFilter getGiftlistSiteFilter()
Returns:
the giftlistSiteFilter

setGiftlistSiteFilter

public void setGiftlistSiteFilter(atg.commerce.gifts.GiftlistSiteFilter pGiftlistSiteFilter)
Parameters:
pGiftlistSiteFilter - the giftlistSiteFilter to set

setAddItemToGiftlistLoginURL

public void setAddItemToGiftlistLoginURL(java.lang.String pAddItemToGiftlistLoginURL)
Parameters:
pAddItemToGiftlistLoginURL - - The property to store the URL for where the user should be redirected if they attempt to add an item to the gift list without being logged in.

getAddItemToGiftlistLoginURL

public java.lang.String getAddItemToGiftlistLoginURL()
Returns:
add item to gift list login URL.

setMoveItemsFromCartLoginURL

public void setMoveItemsFromCartLoginURL(java.lang.String pMoveItemsFromCartLoginURL)
Parameters:
pMoveItemsFromCartLoginURL - - the property to store the URL for where the user should be redirected if they attempt to move items from cart to the gift list without being logged in.

getMoveItemsFromCartLoginURL

public java.lang.String getMoveItemsFromCartLoginURL()
Returns:
the move items from cart to gift list login URL.

setProfilePropertyManager

public void setProfilePropertyManager(atg.userprofiling.PropertyManager pProfilePropertyManager)
Parameters:
pProfilePropertyManager - - the property manager for profiles, used to see if the user is logged in.

getProfilePropertyManager

public atg.userprofiling.PropertyManager getProfilePropertyManager()
Returns:
profile property manager.

setRemoveItemsFromGiftlistSuccessURL

public void setRemoveItemsFromGiftlistSuccessURL(java.lang.String pRemoveItemsFromGiftlistSuccessURL)
Parameters:
pRemoveItemsFromGiftlistSuccessURL - - remove items from gift list success URL.

getRemoveItemsFromGiftlistSuccessURL

public java.lang.String getRemoveItemsFromGiftlistSuccessURL()
Returns:
remove items from gift list success URL.

setRemoveItemsFromGiftlistErrorURL

public void setRemoveItemsFromGiftlistErrorURL(java.lang.String pRemoveItemsFromGiftlistErrorURL)
Parameters:
pRemoveItemsFromGiftlistErrorURL - - remove items from gift list error URL.

getRemoveItemsFromGiftlistErrorURL

public java.lang.String getRemoveItemsFromGiftlistErrorURL()
Returns:
remove items from gift list error URL.

setUpdateGiftlistAndItemsSuccessURL

public void setUpdateGiftlistAndItemsSuccessURL(java.lang.String pUpdateGiftlistAndItemsSuccessURL)
Parameters:
pUpdateGiftlistAndItemsSuccessURL - - The property to store the Success URL for UpdateGiftlistAndItems.

getUpdateGiftlistAndItemsSuccessURL

public java.lang.String getUpdateGiftlistAndItemsSuccessURL()
Returns property UpdateGiftlistAndItemsSuccessURL.

Returns:
The value of the property UpdateGiftlistAndItemsSuccessURL.

setUpdateGiftlistAndItemsErrorURL

public void setUpdateGiftlistAndItemsErrorURL(java.lang.String pUpdateGiftlistAndItemsErrorURL)
Parameters:
pUpdateGiftlistAndItemsErrorURL - - The property to store the error URL for UpdateGiftlistAndItems.

getUpdateGiftlistAndItemsErrorURL

public java.lang.String getUpdateGiftlistAndItemsErrorURL()
Returns:
the value of the property UpdateGiftlistAndItemsErrorURL.

setMoveToNewGiftListAddressSuccessURL

public void setMoveToNewGiftListAddressSuccessURL(java.lang.String pMoveToNewGiftListAddressSuccessURL)
Parameters:
pMoveToNewGiftListAddressSuccessURL - - The property to store the Success URL for MoveToNewGiftListAddress.

getMoveToNewGiftListAddressSuccessURL

public java.lang.String getMoveToNewGiftListAddressSuccessURL()
Returns property MoveToNewGiftListAddressSuccessURL.

Returns:
The value of the property MoveToNewGiftListAddressSuccessURL.

setMoveToNewGiftListAddressErrorURL

public void setMoveToNewGiftListAddressErrorURL(java.lang.String pMoveToNewGiftListAddressErrorURL)
Parameters:
pMoveToNewGiftListAddressErrorURL - - The property to store the error URL for MoveToNewGiftListAddress.

getMoveToNewGiftListAddressErrorURL

public java.lang.String getMoveToNewGiftListAddressErrorURL()
Returns:
the value of the property MoveToNewGiftListAddressErrorURL.

getSessionBean

public SessionBean getSessionBean()
Returns:
the mSessionBean.

setSessionBean

public void setSessionBean(SessionBean pSessionBean)
Parameters:
pSessionBean - the sessionBean to set.

setCurrentDate

public void setCurrentDate(atg.service.util.CurrentDate pCurrentDate)
Sets the CurrentDate component.


getCurrentDate

public atg.service.util.CurrentDate getCurrentDate()
Gets the CurrentDate component.


getUnmodifiedEventName

public java.lang.String getUnmodifiedEventName()
Returns:
the unmodifiedEventName

setUnmodifiedEventName

public void setUnmodifiedEventName(java.lang.String pUnmodifiedEventName)
Parameters:
pUnmodifiedEventName - the mUnmodifiedEventName to set

preAddItemToGiftlist

public void preAddItemToGiftlist(atg.servlet.DynamoHttpServletRequest pRequest,
                                 atg.servlet.DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
Before adding an item to the giftlist validate quantity and SKU ID, also check if user is explicitly logged in. If not store product/SKU/gift list info into the session.

Overrides:
preAddItemToGiftlist in class atg.commerce.gifts.GiftlistFormHandler
Parameters:
pRequest - - the HTTP request.
pResponse - - the HTTP response.
Throws:
javax.servlet.ServletException - if there was an error while executing the code.
java.io.IOException - if there was an error with servlet io.

addLoginErrorParameter

protected void addLoginErrorParameter(atg.servlet.DynamoHttpServletRequest pRequest,
                                      atg.servlet.DynamoHttpServletResponse pResponse)
Adds 'error' query parameter to the request with the resource key to the error message that should be displayed on the login page.

Parameters:
pRequest - - the HTTP request.
pResponse - - the HTTP response.

preMoveItemsFromCart

public void preMoveItemsFromCart(atg.servlet.DynamoHttpServletRequest pRequest,
                                 atg.servlet.DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
Before moving item to the gift list check if user is explicitly logged in. If not store product/SKU/gift list info into the session.

Overrides:
preMoveItemsFromCart in class atg.commerce.gifts.GiftlistFormHandler
Parameters:
pRequest - - HTTP request.
pResponse - - HTTP response.
Throws:
javax.servlet.ServletException - if there was an error while executing the code.
java.io.IOException - if there was an error with servlet io.

setGiftlist

public void setGiftlist(atg.repository.RepositoryItem pGiftlist)
Initializes all the form values from the provided gift list.

Parameters:
pGiftlist - - gift list.

clearForm

public void clearForm()
Clears the form handler property values.


handleCancel

public boolean handleCancel(atg.servlet.DynamoHttpServletRequest pRequest,
                            atg.servlet.DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Clears form errors as part of the cancel operation.

Overrides:
handleCancel in class atg.droplet.GenericFormHandler
Parameters:
pRequest - - the HTTP request.
pResponse - - HTTP response.
Returns:
true if successful, otherwise false.
Throws:
javax.servlet.ServletException - if servlet error occurs.
java.io.IOException - if IO error occurs.

handleMoveToNewGiftListAddress

public boolean handleMoveToNewGiftListAddress(atg.servlet.DynamoHttpServletRequest pRequest,
                                              atg.servlet.DynamoHttpServletResponse pResponse)
                                       throws javax.servlet.ServletException,
                                              java.io.IOException
Stores entered by user data to the sessions-scoped component before moving to Add New Address URL. The stored data can be retrieved later during form initialization.

Parameters:
pRequest - - the HTTP request.
pResponse - - the HTTP response.
Returns:
true if successful, otherwise false.
Throws:
javax.servlet.ServletException - if servlet error occurs.
java.io.IOException - if IO error occurs.

storeNewGiftListData

public void storeNewGiftListData()
Stores entered by user data to the session-scoped component.


handleInitializeGiftListForm

public boolean handleInitializeGiftListForm(atg.servlet.DynamoHttpServletRequest pRequest,
                                            atg.servlet.DynamoHttpServletResponse pResponse)
Initializes Gift list form with previously entered data stored in the session-scoped component.

Parameters:
pRequest - the HTTP request.
pResponse - the HTTP response.
Returns:
true

postSaveGiftlist

public void postSaveGiftlist(atg.servlet.DynamoHttpServletRequest pRequest,
                             atg.servlet.DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Overrides base method to clear the form after the new gift list has been successfully saved.

Overrides:
postSaveGiftlist in class atg.commerce.gifts.GiftlistFormHandler
Parameters:
pRequest - the HTTP request.
pResponse - the HTTP response.
Throws:
javax.servlet.ServletException - if servlet error occurs.
java.io.IOException - if IO error occurs.

preSaveGiftlist

public void preSaveGiftlist(atg.servlet.DynamoHttpServletRequest pRequest,
                            atg.servlet.DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
Calls validatation of event name

Overrides:
preSaveGiftlist in class atg.commerce.gifts.GiftlistFormHandler
Throws:
javax.servlet.ServletException
java.io.IOException

validateEventName

protected void validateEventName(java.lang.String pEventName,
                                 atg.servlet.DynamoHttpServletRequest pRequest,
                                 atg.servlet.DynamoHttpServletResponse pResponse)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
This method validates event name. Name considered invalid if there is already a gift list available on this site. If UnmodifiedEventName is set, then we are in edit gift list mode. No validation should take place if the gift list name wasn't changed.

Parameters:
pResponse -
pRequest -
Throws:
java.io.IOException
javax.servlet.ServletException

handleUpdateGiftlistAndItems

public boolean handleUpdateGiftlistAndItems(atg.servlet.DynamoHttpServletRequest pRequest,
                                            atg.servlet.DynamoHttpServletResponse pResponse)
                                     throws javax.servlet.ServletException,
                                            java.io.IOException,
                                            atg.commerce.CommerceException
The combined handler that allows to update gift list and its items at the same time.

Parameters:
pRequest - the servlet's request.
pResponse - the servlet's response.
Returns:
true if successful, otherwise false.
Throws:
javax.servlet.ServletException - if there was an error while executing the code.
java.io.IOException - if there was an error with servlet io.
atg.commerce.CommerceException - if there was an error with Commerce.

preUpdateGiftlistAndItems

public void preUpdateGiftlistAndItems(atg.servlet.DynamoHttpServletRequest pRequest,
                                      atg.servlet.DynamoHttpServletResponse pResponse)
                               throws javax.servlet.ServletException,
                                      java.io.IOException
Operation called just before a gift list and gift items are updated.

Parameters:
pRequest - - the HTTP request.
pResponse - - the HTTP response.
Throws:
javax.servlet.ServletException - if there was an error while executing the code.
java.io.IOException - if there was an error with servlet io.

postUpdateGiftlistAndItems

public void postUpdateGiftlistAndItems(atg.servlet.DynamoHttpServletRequest pRequest,
                                       atg.servlet.DynamoHttpServletResponse pResponse)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Operation called just after a gift list and gift items are updated.

Parameters:
pRequest - - the HTTP request.
pResponse - - the HTTP response.
Throws:
javax.servlet.ServletException - if something went wrong.
java.io.IOException - if something went wrong.

preRemoveItemsFromGiftlist

public void preRemoveItemsFromGiftlist(atg.servlet.DynamoHttpServletRequest pRequest,
                                       atg.servlet.DynamoHttpServletResponse pResponse)
                                throws javax.servlet.ServletException,
                                       java.io.IOException
Operation called just before items are removed from a a gift list.

Parameters:
pRequest - the HTTP request.
pResponse - the HTTP response.
Throws:
javax.servlet.ServletException - if there was an error while executing the code.
java.io.IOException - if there was an error with servlet io.

postRemoveItemsFromGiftlist

public void postRemoveItemsFromGiftlist(atg.servlet.DynamoHttpServletRequest pRequest,
                                        atg.servlet.DynamoHttpServletResponse pResponse)
                                 throws javax.servlet.ServletException,
                                        java.io.IOException
Operation called just after items are removed from a a gift list.

Parameters:
pRequest - the HTTP request.
pResponse - the HTTP response.
Throws:
javax.servlet.ServletException - if there was an error while executing the code.
java.io.IOException - if there was an error with servlet io.

handleRemoveItemsFromGiftlist

public boolean handleRemoveItemsFromGiftlist(atg.servlet.DynamoHttpServletRequest pRequest,
                                             atg.servlet.DynamoHttpServletResponse pResponse)
                                      throws javax.servlet.ServletException,
                                             java.io.IOException,
                                             atg.commerce.CommerceException
HandleRemoveItemsFromGiftlist is called when the user hits the "delete" button on the wish list page. This handler removes the specified gift Ids from the specified gift list.

Parameters:
pRequest - the HTTP request.
pResponse - the HTTP response.
Returns:
true if successful, false otherwise.
Throws:
javax.servlet.ServletException - if there was an error while executing the code.
java.io.IOException - if there was an error with servlet io.
atg.commerce.CommerceException - if there was an error with Commerce.

removeItemsFromGiftlist

protected void removeItemsFromGiftlist(atg.servlet.DynamoHttpServletRequest pRequest,
                                       atg.servlet.DynamoHttpServletResponse pResponse)
                                throws javax.servlet.ServletException,
                                       java.io.IOException,
                                       atg.commerce.CommerceException
Removes the given items to the selected gift list.

Parameters:
pRequest - the HTTP request.
pResponse - the HTTP response.
Throws:
javax.servlet.ServletException - if there was an error while executing the code.
java.io.IOException - if there was an error with servlet io.
atg.commerce.CommerceException - if there was an error with Commerce.

updateOrder

protected void updateOrder(atg.commerce.order.CommerceItem pItem,
                           long pQuantity,
                           atg.servlet.DynamoHttpServletRequest pRequest,
                           atg.servlet.DynamoHttpServletResponse pResponse)
                    throws atg.commerce.gifts.InvalidGiftQuantityException,
                           java.io.IOException,
                           javax.servlet.ServletException
Will update the quantity of the commerceItem passed in. If quantity moved to gift list from cart equals or is greater than that in cart, it will remove the item from the cart. Otherwise, it will decrease the number by quantity passed in.

Overrides:
updateOrder in class atg.commerce.gifts.GiftlistFormHandler
Parameters:
pItem - the commerce item to update.
pQuantity - the number moved to gift list.
pRequest - the HTTP request.
pResponse - the HTTP response.
Throws:
atg.commerce.gifts.InvalidGiftQuantityException - - if pQuantity <= 0.
java.io.IOException - if there was an error with servlet io.
javax.servlet.ServletException - if there was an error with Servlet.

postMoveItemsFromCart

public void postMoveItemsFromCart(atg.servlet.DynamoHttpServletRequest pRequest,
                                  atg.servlet.DynamoHttpServletResponse pResponse)
                           throws javax.servlet.ServletException,
                                  java.io.IOException
Operation called just after an item has been moved from shopping cart.

Overrides:
postMoveItemsFromCart in class atg.commerce.gifts.GiftlistFormHandler
Parameters:
pRequest - the HTTP request.
pResponse - the HTTP response.
Throws:
javax.servlet.ServletException - if there was an error while executing the code.
java.io.IOException - if there was an error with servlet io.