|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.droplet.EmptyFormHandler
atg.droplet.GenericFormHandler
atg.droplet.TransactionalFormHandler
atg.commerce.gifts.GiftlistFormHandler
public class GiftlistFormHandler
This class provides convenient form handling methods for operating on the current customer's giftlists. It can be used to create new giftlists edit giftlists and add items to the giftlist during the shopping process.
Giftlist management is the core functionality of this form handler. it controls creating, updating and item management to all of the customer's wishlist/giftlist registries. This includes creating, updating, publishing, and deleting gift registries as well as adding items to the lists This functionality is invoked via the various handleXXX methods of the form handler.
All handle methods in this form handler mirror a similiar pattern.
Each handleXXX process, some have an associated preXXX and postXXX method.
For example, the handleAddItemToGiftlist
has an associate
preAddItemToGiftlist
and postAddItemToGiftlist
.
These pre/post methods provide an easy way for a user to extend the
functionality of this form handler.
GenericFormHandler
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected GiftlistDateUtil |
dateUtil
|
protected static ParameterName |
LOCALE_PARAM
Name of the locale parameter |
static java.lang.String |
MSG_ERROR_ADDING_TO_GIFTLIST
|
static java.lang.String |
MSG_ERROR_DELETING_GIFTLIST
|
static java.lang.String |
MSG_ERROR_NO_SUCH_GIFTLIST
|
static java.lang.String |
MSG_ERROR_REMOVING_RROM_GIFTLIST
|
static java.lang.String |
MSG_ERROR_SAVING_GIFTLIST
|
static java.lang.String |
MSG_ERROR_UPDATING_GIFTLIST_ITEMS
|
static java.lang.String |
MSG_INVALID_EVENT_DATE
|
static java.lang.String |
MSG_INVALID_GIFTLIST_QUANTITY
|
static java.lang.String |
MSG_NO_GIFTLIST_TO_MODIFY
|
static java.lang.String |
MSG_NO_ITEM_FOUND
|
static java.lang.String |
MSG_NO_ITEMS_TO_ADD
|
static java.lang.String |
MSG_NO_SKU_WITH_ID
|
static java.lang.String |
MSG_QUANTITY_LESSTHAN_OR_EQUALTO_ZERO
|
protected static java.lang.String |
MY_RESOURCE_NAME
Name of the resource |
long |
QUANTITY_NOT_VALID
|
protected static java.util.ResourceBundle |
sResourceBundle
Resource Bundle |
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 | |
---|---|
GiftlistFormHandler()
Constructs an instanceof GiftlistFormHandler |
Method Summary | |
---|---|
protected void |
addItemToGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Adds the given item to the selected giftlist |
protected void |
createGiftlist()
Creates a new giftlist. |
protected java.lang.String |
createNewShippingAddress()
Creates a shipping address in the address book and return the id. |
java.lang.String |
formatUserMessage(java.lang.String pKey,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to format a message with no arguments using the Locale of the user |
java.lang.String |
formatUserMessage(java.lang.String pKey,
java.lang.Object[] pParams,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to format a message with two arguments using our resource bundle. |
java.lang.String |
formatUserMessage(java.lang.String pKey,
java.lang.Object pParam,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to format a message with one argument using the Locale of the user |
java.lang.String |
formatUserMessage(java.lang.String pKey,
java.lang.Object pParam1,
java.lang.Object pParam2,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Utility method to format a message with two arguments using our resource bundle. |
protected java.lang.String |
generatePropertyPath(java.lang.String pPropertyName)
generate property path takes a string and creates full path to property. |
java.lang.String |
getAddItemToGiftlistErrorURL()
Returns property AddItemToGiftlistErrorURL |
java.lang.String |
getAddItemToGiftlistSuccessURL()
Returns property AddItemToGiftlistSuccessURL |
java.util.Map |
getAddresses()
Returns property addresses |
java.lang.String[] |
getCatalogRefIds()
Returns property catalogRefIds. |
CatalogTools |
getCatalogTools()
Returns property catalogTools. |
java.lang.String |
getComments()
Returns property comments. |
java.lang.String |
getCreateGiftlistErrorURL()
Returns property CreateGiftlistErrorURL |
java.lang.String |
getCreateGiftlistSuccessURL()
Returns property CreateGiftlistSuccessURL |
java.lang.String |
getDate()
Returns property date. |
java.lang.String[] |
getDates()
Returns property dates |
java.util.Locale |
getDefaultLocale()
Returns property DefaultLocale. |
java.lang.String |
getDeleteGiftlistErrorURL()
Returns property DeleteGiftlistErrorURL |
java.lang.String |
getDeleteGiftlistSuccessURL()
Returns property DeleteGiftlistSuccessURL |
java.lang.String |
getDescription()
Returns property description. |
java.util.Date |
getEventDate()
Returns eventDate property. |
java.lang.String |
getEventName()
Returns the eventName. |
java.lang.String |
getEventType()
Returns eventType property. |
java.util.Collection |
getEventTypes()
eventType is an enumerated property in the giftlist repository. |
java.lang.String |
getGeneralFailureURL()
Returns property generalFailureURL. |
java.lang.String |
getGeneralSuccessURL()
Returns property generalSuccessURL. |
java.lang.String |
getGiftlistId()
Returns property giftlistId. |
GiftlistManager |
getGiftlistManager()
Returns property giftlistManager. |
Repository |
getGiftlistRepository()
Returns property GiftlistRepository |
java.lang.String |
getInstructions()
Returns property instructions. |
boolean |
getIsNewAddress()
Returns property IsNewAddress |
java.lang.Boolean |
getIsPublic()
Returns property isPublic |
java.lang.Boolean |
getIsPublished()
Returns the IsPublished flag |
java.lang.String[] |
getItemIds()
Returns property itemIds. |
java.lang.String |
getItemRemovedFromOrderEventType()
Returns the JMS message name for the item removed from order message. |
java.lang.Integer |
getMonth()
Returns property month. |
java.lang.String[] |
getMonths()
Returns property months |
java.lang.String |
getMoveItemsFromCartErrorURL()
Returns property MoveItemsFromCartErrorURL |
java.lang.String |
getMoveItemsFromCartSuccessURL()
Returns property MoveItemsFromCartSuccessURL |
Address |
getNewAddress()
Returns property newAddress. |
java.lang.String |
getNewAddressName()
Returns property NewAddressName. |
Order |
getOrder()
Returns property Order, if the shoppingCart property is not null, then return the current order of the shopping cart order holder |
OrderManager |
getOrderManager()
Returns property orderManager. |
PipelineManager |
getPipelineManager()
Get the pipeline manager used to generate ItemRemovedFromOrder messages |
java.lang.String |
getProductId()
Returns property productId. |
RepositoryItem |
getProfile()
Returns property Profile |
CommerceProfileTools |
getProfileTools()
Returns property profileTools. |
long |
getQuantity()
Returns property Quantity |
long |
getQuantity(java.lang.String pCatalogRefId,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Retrieve the quanity that should be used for the given item |
java.lang.String[] |
getRemoveGiftitemIds()
Returns property RemoveGiftitemIds. |
java.lang.String |
getSaveGiftlistErrorURL()
Returns property SaveGiftlistErrorURL |
java.lang.String |
getSaveGiftlistSuccessURL()
Returns property SaveGiftlistSuccessURL |
java.lang.String |
getShippingAddressId()
Returns property shippingAddressId. |
OrderHolder |
getShoppingCart()
Returns property ShoppingCart |
java.util.Map |
getSpecialInstructions()
Returns property specialInstructions. |
java.lang.String |
getUpdateGiftlistErrorURL()
Returns property UpdateGiftlistErrorURL |
java.lang.String |
getUpdateGiftlistItemsErrorURL()
Returns property UpdateGiftlistItemsErrorURL |
java.lang.String |
getUpdateGiftlistItemsSuccessURL()
Returns property UpdateGiftlistItemsSuccessURL |
java.lang.String |
getUpdateGiftlistSuccessURL()
Returns property UpdateGiftlistSuccessURL |
java.util.Locale |
getUserLocale(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns the locale associated with the request. |
java.lang.String |
getYear()
Returns property year. |
java.lang.String[] |
getYears()
Returns property years |
boolean |
handleAddItemToGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
handleAddItemToGiftlist is called when the user hits the submit button on a product page to add an item to the giftlist. |
boolean |
handleCreateGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called when the customer selects create to create a new giftlist. |
boolean |
handleDeleteGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called when the customer pushes delete giftlist. |
boolean |
handleMoveItemsFromCart(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
handleMoveItemsFromCart is called when the user hits the submit button on the move items from cart page. |
void |
handlePipelineError(java.lang.Object pError,
java.lang.String pErrorKey)
Add a pipeline error to the list of form exceptions. |
boolean |
handleSaveGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called when the customer selects save giftlist. |
boolean |
handleUpdateGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Called when the customer selects update giftlist. |
boolean |
handleUpdateGiftlistItems(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This handle method updates items in the current giftlist either increasing or decreasing quantity desired or if checked, removing the item from the giftlist |
boolean |
isSendItemRemovedMessages()
Query whether to send ItemRemovedFromOrder messages when moving items from the shopping cart to a gift list or wish list. |
boolean |
isUseRequestLocale()
Returns property UseRequestLocale |
protected void |
moveItemsFromCart(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
this method moves selected items in itemIds from shopping cart to giftlist. |
void |
postAddItemToGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just after an item has been added to a giftlist |
void |
postCreateGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just giftlist creation is finished |
void |
postDeleteGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just after a giftlist is deleted |
void |
postMoveItemsFromCart(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just after an item has been moved from shopping cart |
void |
postSaveGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just after a giftlist is saved |
void |
postUpdateGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just after a giftlist is updated |
void |
postUpdateGiftlistItems(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just after items in giftlist are updated |
void |
preAddItemToGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just before an item is added to a giftlist |
void |
preCreateGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just before giftlist creation is started |
void |
preDeleteGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just before giftlist is deleted |
void |
preMoveItemsFromCart(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just before an item is is moved from shopping cart |
void |
preSaveGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just before giftlist is saved |
void |
preUpdateGiftlist(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just before giftlist is updated |
void |
preUpdateGiftlistItems(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Operation called just before items in giftlist are updated |
void |
processException(java.lang.Exception pException,
java.lang.String pMsgId,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Add a user error message to the form exceptions, and then display the exception in the logs |
protected boolean |
processPipelineErrors(PipelineResult pResult)
Examine the pipeline result looking for any error messages, creates DropletExceptions and adds them as form exceptions |
protected void |
sendScenarioEvent(Order pOrder,
CommerceItem pItem,
long pQuantity,
java.lang.String pMsgType)
Send a message to the Dynamo Scenario Server. |
void |
setAddItemToGiftlistErrorURL(java.lang.String pAddItemToGiftlistErrorURL)
Sets property AddItemToGiftlistErrorURL |
void |
setAddItemToGiftlistSuccessURL(java.lang.String pAddItemToGiftlistSuccessURL)
Sets property AddItemToGiftlistSuccessURL |
void |
setCatalogRefIds(java.lang.String[] pCatalogRefIds)
Sets property catalogRefIds. |
void |
setCatalogTools(CatalogTools pCatalogTools)
Sets property catalogTools. |
void |
setComments(java.lang.String pComments)
Sets property comments. |
void |
setCreateGiftlistErrorURL(java.lang.String pCreateGiftlistErrorURL)
Sets property CreateGiftlistErrorURL |
void |
setCreateGiftlistSuccessURL(java.lang.String pCreateGiftlistSuccessURL)
Sets property CreateGiftlistSuccessURL |
void |
setDate(java.lang.String pDate)
Sets property date. |
void |
setDefaultLocale(java.util.Locale pDefaultLocale)
Sets property DefaultLocale |
void |
setDeleteGiftlistErrorURL(java.lang.String pDeleteGiftlistErrorURL)
Sets property DeleteGiftlistErrorURL |
void |
setDeleteGiftlistSuccessURL(java.lang.String pDeleteGiftlistSuccessURL)
Sets property DeleteGiftlistSuccessURL |
void |
setDescription(java.lang.String pDescription)
Sets property description. |
void |
setEventDate(java.util.Date pEventDate)
Sets eventDate property. |
void |
setEventName(java.lang.String pEventName)
Sets the eventName. |
void |
setEventType(java.lang.String pEventType)
Sets eventType property. |
void |
setGeneralFailureURL(java.lang.String pGeneralFailureURL)
Sets property generalFailureURL |
void |
setGeneralSuccessURL(java.lang.String pGeneralSuccessURL)
Sets property generalSuccessURL. |
void |
setGiftlistId(java.lang.String pGiftlistId)
Sets property giftlistId. |
void |
setGiftlistManager(GiftlistManager pGiftlistManager)
Sets property giftlistManager. |
void |
setGiftlistRepository(Repository pGiftlistRepository)
Sets property GiftlistRepository |
void |
setInstructions(java.lang.String pInstructions)
Sets property instructions. |
void |
setIsNewAddress(boolean pIsNewAddress)
Sets property isNewAddress |
void |
setIsPublic(java.lang.Boolean pIsPublic)
Sets property isPublic |
void |
setIsPublished(java.lang.Boolean pIsPublished)
Sets the isPublished flag |
void |
setItemIds(java.lang.String[] pItemIds)
Sets property itemIds. |
void |
setItemRemovedFromOrderEventType(java.lang.String pItemRemovedFromOrderEventType)
Set the JMS message name for the item removed from order message |
void |
setMonth(java.lang.Integer pMonth)
Sets property month. |
void |
setMoveItemsFromCartErrorURL(java.lang.String pMoveItemsFromCartErrorURL)
Sets property MoveItemsFromCartErrorURL |
void |
setMoveItemsFromCartSuccessURL(java.lang.String pMoveItemsFromCartSuccessURL)
Sets property MoveItemsFromCartSuccessURL |
void |
setNewAddress(Address pNewAddress)
Sets property newAddress. |
void |
setNewAddressName(java.lang.String pNewAddressName)
Sets property NewAddressName. |
void |
setOrderManager(OrderManager pOrderManager)
Sets property orderManager. |
void |
setPipelineManager(PipelineManager pPipelineManager)
Set the pipeline manager used to generate ItemRemovedFromOrder messages |
void |
setProductId(java.lang.String pProductId)
Sets property productId. |
void |
setProfile(RepositoryItem pProfile)
Sets property profile. |
void |
setProfileTools(CommerceProfileTools pProfileTools)
Sets property profileTools |
void |
setQuantity(long pQuantity)
Sets property Quantity |
void |
setRemoveGiftitemIds(java.lang.String[] pRemoveGiftitemIds)
Sets property RemoveGiftitemIds. |
void |
setSaveGiftlistErrorURL(java.lang.String pSaveGiftlistErrorURL)
Sets property SaveGiftlistErrorURL |
void |
setSaveGiftlistSuccessURL(java.lang.String pSaveGiftlistSuccessURL)
Sets property SaveGiftlistSuccessURL |
void |
setSendItemRemovedMessages(boolean pSendItemRemovedMessages)
Specify whether to send ItemRemovedFromOrder messages when moving items from the shopping cart to a gift list or wish list. |
void |
setShippingAddressId(java.lang.String pShippingAddressId)
Sets property shippingAddressId. |
void |
setShoppingCart(OrderHolder pShoppingCart)
Sets property ShoppingCart |
void |
setSpecialInstructions(java.util.Map pSpecialInstructions)
Sets property specialInstructions. |
void |
setUpdateGiftlistErrorURL(java.lang.String pUpdateGiftlistErrorURL)
Sets property UpdateGiftlistErrorURL |
void |
setUpdateGiftlistItemsErrorURL(java.lang.String pUpdateGiftlistItemsErrorURL)
Sets property UpdateGiftlistItemsErrorURL |
void |
setUpdateGiftlistItemsSuccessURL(java.lang.String pUpdateGiftlistItemsSuccessURL)
Sets property UpdateGiftlistItemsSuccessURL |
void |
setUpdateGiftlistSuccessURL(java.lang.String pUpdateGiftlistSuccessURL)
Sets property UpdateGiftlistSuccessURL |
void |
setUseRequestLocale(boolean pUseRequestLocale)
Sets property UseRequestLocale |
void |
setYear(java.lang.String pYear)
Sets property year. |
protected void |
updateGiftlistItems(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method is used to update items in a giftlist by either changing its quantity or removing it altogether. |
protected void |
updateOrder(CommerceItem pItem,
long pQuantity,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
updateOrder will update the quantity of the commerceItem passed in. |
protected boolean |
validateGiftlistId(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Make sure giftlistId is valid, i.e., such a giftlist exists. |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, 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
protected static final java.lang.String MY_RESOURCE_NAME
protected static final ParameterName LOCALE_PARAM
public static final java.lang.String MSG_QUANTITY_LESSTHAN_OR_EQUALTO_ZERO
public static final java.lang.String MSG_NO_GIFTLIST_TO_MODIFY
public static final java.lang.String MSG_NO_ITEMS_TO_ADD
public static final java.lang.String MSG_ERROR_ADDING_TO_GIFTLIST
public static final java.lang.String MSG_NO_SKU_WITH_ID
public static final java.lang.String MSG_ERROR_REMOVING_RROM_GIFTLIST
public static final java.lang.String MSG_NO_ITEM_FOUND
public static final java.lang.String MSG_INVALID_EVENT_DATE
public static final java.lang.String MSG_ERROR_SAVING_GIFTLIST
public static final java.lang.String MSG_ERROR_DELETING_GIFTLIST
public static final java.lang.String MSG_ERROR_UPDATING_GIFTLIST_ITEMS
public static final java.lang.String MSG_INVALID_GIFTLIST_QUANTITY
public static final java.lang.String MSG_ERROR_NO_SUCH_GIFTLIST
public long QUANTITY_NOT_VALID
protected static java.util.ResourceBundle sResourceBundle
protected GiftlistDateUtil dateUtil
Constructor Detail |
---|
public GiftlistFormHandler()
Method Detail |
---|
public void setGiftlistManager(GiftlistManager pGiftlistManager)
pGiftlistManager
- the giftlistManager class which provides a high level business layer interface to giftlists.public GiftlistManager getGiftlistManager()
public void setOrderManager(OrderManager pOrderManager)
pOrderManager
- the OrderManager class which provides a high level business layer interface to orders.public OrderManager getOrderManager()
public void setCatalogTools(CatalogTools pCatalogTools)
pCatalogTools
- the catalogTools which provides low level operations on the catalog.public CatalogTools getCatalogTools()
public void setSendItemRemovedMessages(boolean pSendItemRemovedMessages)
public boolean isSendItemRemovedMessages()
public void setPipelineManager(PipelineManager pPipelineManager)
public PipelineManager getPipelineManager()
public void setItemRemovedFromOrderEventType(java.lang.String pItemRemovedFromOrderEventType)
public java.lang.String getItemRemovedFromOrderEventType()
public void setProfileTools(CommerceProfileTools pProfileTools)
pProfileTools
- the ProfileTools for Commerce which provides low level operations on the current user's profile.public CommerceProfileTools getProfileTools()
public void setShoppingCart(OrderHolder pShoppingCart)
pShoppingCart
- the default shopping cart for the current customer.public OrderHolder getShoppingCart()
public Order getOrder()
public void setDefaultLocale(java.util.Locale pDefaultLocale)
pDefaultLocale
- the default locale for the current customer.public java.util.Locale getDefaultLocale()
public void setUseRequestLocale(boolean pUseRequestLocale)
pUseRequestLocale
- boolean to specify whether to use request locale.public boolean isUseRequestLocale()
public void setEventName(java.lang.String pEventName)
pEventName
- The property to store the giftlist event name.public java.lang.String getEventName()
public void setMonth(java.lang.Integer pMonth)
pMonth
- The property to store the month value of the event date.public java.lang.Integer getMonth()
public void setDate(java.lang.String pDate)
pDate
- The property to store the day of the month value of the event date.public java.lang.String getDate()
public void setYear(java.lang.String pYear)
pYear
- The property to store the year value of the event date.public java.lang.String getYear()
public void setEventDate(java.util.Date pEventDate)
pEventDate
- The property to store the event date as a Calendar object.public java.util.Date getEventDate() throws InvalidDateException
InvalidDateException
- if an invalid date was entered for giftlist.public void setEventType(java.lang.String pEventType)
pEventType
- The property to store the event type.public java.lang.String getEventType()
public void setDescription(java.lang.String pDescription)
pDescription
- The property to store the giftlist description.public java.lang.String getDescription()
public void setComments(java.lang.String pComments)
pComments
- The property to store the giftlist comments.public java.lang.String getComments()
public void setInstructions(java.lang.String pInstructions)
pInstructions
- The property to store the giftlist instructions.public java.lang.String getInstructions()
public void setSpecialInstructions(java.util.Map pSpecialInstructions)
pSpecialInstructions
- The property to store the giftlist specialInstructions.public java.util.Map getSpecialInstructions()
public void setIsPublic(java.lang.Boolean pIsPublic)
pIsPublic
- The property to store the property isPublic which specifies if a giftlist can be visible to persons other than the owner.public java.lang.Boolean getIsPublic()
public void setIsPublished(java.lang.Boolean pIsPublished)
pIsPublished
- The property to store the property isPublic which specifies if a giftlist is visible to persons other than the owner.public java.lang.Boolean getIsPublished()
public void setGiftlistId(java.lang.String pGiftlistId)
pGiftlistId
- The property to store the giftlistId property of the current giftlist.public java.lang.String getGiftlistId()
public void setProfile(RepositoryItem pProfile)
pProfile
- The property to store the profile of the current customer.public RepositoryItem getProfile()
public void setGiftlistRepository(Repository pGiftlistRepository)
pGiftlistRepository
- The property to store the value of the giftlist repository.public Repository getGiftlistRepository()
public java.util.Map getAddresses()
public java.lang.String[] getMonths()
public java.lang.String[] getDates()
public java.lang.String[] getYears()
public java.util.Collection getEventTypes()
public void setShippingAddressId(java.lang.String pShippingAddressId)
pShippingAddressId
- The property to store the selected shipping Address Id for the giftlist.public java.lang.String getShippingAddressId()
public void setIsNewAddress(boolean pIsNewAddress)
pIsNewAddress
- The property to store the property IsNewAddress.public boolean getIsNewAddress()
public void setNewAddressName(java.lang.String pNewAddressName)
pNewAddressName
- The property to store the nickname for the new shipping address.public java.lang.String getNewAddressName()
public void setNewAddress(Address pNewAddress)
pNewAddress
- The property to store the new address.public Address getNewAddress()
public void setCatalogRefIds(java.lang.String[] pCatalogRefIds)
pCatalogRefIds
- The property to store the selected skus to add to the current giftlist.public java.lang.String[] getCatalogRefIds()
public void setRemoveGiftitemIds(java.lang.String[] pRemoveGiftitemIds)
pRemoveGiftitemIds
- The property to store the selected skus to remove from the current giftlist.public java.lang.String[] getRemoveGiftitemIds()
public void setItemIds(java.lang.String[] pItemIds)
pItemIds
- The property to store the selected commerce item ids to move from shopping cart to giftlist.public java.lang.String[] getItemIds()
public void setProductId(java.lang.String pProductId)
pProductId
- The property to store the selected productId to add to the giftlist.public java.lang.String getProductId()
public void setQuantity(long pQuantity)
pQuantity
- The property to store the number of items to add to the giftlist.public long getQuantity()
public void setCreateGiftlistSuccessURL(java.lang.String pCreateGiftlistSuccessURL)
pCreateGiftlistSuccessURL
- The property to store the success URL for CreateGiftlist.public java.lang.String getCreateGiftlistSuccessURL()
public void setCreateGiftlistErrorURL(java.lang.String pCreateGiftlistErrorURL)
pCreateGiftlistErrorURL
- The property to store the Error URL for CreateGiftlist.public java.lang.String getCreateGiftlistErrorURL()
public void setSaveGiftlistSuccessURL(java.lang.String pSaveGiftlistSuccessURL)
pSaveGiftlistSuccessURL
- The property to store the success URL for SaveGiftlist.public java.lang.String getSaveGiftlistSuccessURL()
public void setSaveGiftlistErrorURL(java.lang.String pSaveGiftlistErrorURL)
pSaveGiftlistErrorURL
- The property to store the Error URL for SaveGiftlist.public java.lang.String getSaveGiftlistErrorURL()
public void setUpdateGiftlistSuccessURL(java.lang.String pUpdateGiftlistSuccessURL)
pUpdateGiftlistSuccessURL
- The property to store the Success URL for UpdateGiftlist.public java.lang.String getUpdateGiftlistSuccessURL()
public void setUpdateGiftlistErrorURL(java.lang.String pUpdateGiftlistErrorURL)
pUpdateGiftlistErrorURL
- The property to store the error URL for UpdateGiftlist.public java.lang.String getUpdateGiftlistErrorURL()
public void setUpdateGiftlistItemsSuccessURL(java.lang.String pUpdateGiftlistItemsSuccessURL)
pUpdateGiftlistItemsSuccessURL
- The property to store the Success URL for UpdateGiftlist.public java.lang.String getUpdateGiftlistItemsSuccessURL()
public void setUpdateGiftlistItemsErrorURL(java.lang.String pUpdateGiftlistItemsErrorURL)
pUpdateGiftlistItemsErrorURL
- The property to store the error URL for UpdateGiftlist.public java.lang.String getUpdateGiftlistItemsErrorURL()
public void setDeleteGiftlistSuccessURL(java.lang.String pDeleteGiftlistSuccessURL)
pDeleteGiftlistSuccessURL
- The property to store the success URL for DeleteGiftlist.public java.lang.String getDeleteGiftlistSuccessURL()
public void setDeleteGiftlistErrorURL(java.lang.String pDeleteGiftlistErrorURL)
pDeleteGiftlistErrorURL
- The property to store the error URL for DeleteGiftlist.public java.lang.String getDeleteGiftlistErrorURL()
public void setAddItemToGiftlistSuccessURL(java.lang.String pAddItemToGiftlistSuccessURL)
pAddItemToGiftlistSuccessURL
- The property to store the success URL for addItemToGiftlist.public java.lang.String getAddItemToGiftlistSuccessURL()
public void setAddItemToGiftlistErrorURL(java.lang.String pAddItemToGiftlistErrorURL)
pAddItemToGiftlistErrorURL
- The property to store the error URL for addItemToGiftlist.public java.lang.String getAddItemToGiftlistErrorURL()
public void setMoveItemsFromCartSuccessURL(java.lang.String pMoveItemsFromCartSuccessURL)
pMoveItemsFromCartSuccessURL
- The property to store the success URL for MoveItemsFromCart.public java.lang.String getMoveItemsFromCartSuccessURL()
public void setMoveItemsFromCartErrorURL(java.lang.String pMoveItemsFromCartErrorURL)
pMoveItemsFromCartErrorURL
- The property to store the error URL for MoveItemsFromCart.public java.lang.String getMoveItemsFromCartErrorURL()
public void setGeneralSuccessURL(java.lang.String pGeneralSuccessURL)
pGeneralSuccessURL
- The property to store the general success URL.public java.lang.String getGeneralSuccessURL()
public void setGeneralFailureURL(java.lang.String pGeneralFailureURL)
pGeneralFailureURL
- The property to store the general failure URL.public java.lang.String getGeneralFailureURL()
public boolean handleCreateGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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
CommerceException
- if there was an error with Commerceprotected void createGiftlist()
public void preCreateGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongpublic void postCreateGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongpublic boolean handleSaveGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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
CommerceException
- if there was an error with Commercepublic void preSaveGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongpublic void postSaveGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongpublic boolean handleUpdateGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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
CommerceException
- if there was an error with Commercepublic void preUpdateGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongpublic void postUpdateGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongpublic boolean handleDeleteGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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
CommerceException
- if there was an error with Commercepublic void preDeleteGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongpublic void postDeleteGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongpublic boolean handleAddItemToGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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
CommerceException
- if there was an error with Commercepublic void preAddItemToGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongpublic void postAddItemToGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongprotected void addItemToGiftlist(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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
CommerceException
- if there was an error with Commercepublic boolean handleMoveItemsFromCart(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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
CommerceException
- if there was an error with Commercepublic void preMoveItemsFromCart(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongpublic void postMoveItemsFromCart(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongprotected void moveItemsFromCart(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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
CommerceException
- if there was an error with Commercepublic void preUpdateGiftlistItems(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongpublic void postUpdateGiftlistItems(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the dynamo request objectpResponse
- the dynamo response object
javax.servlet.ServletException
- if something went wrong
java.io.IOException
- if something went wrongpublic boolean handleUpdateGiftlistItems(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 ioprotected void updateGiftlistItems(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException, CommerceException
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
CommerceException
- if there was an error with Commercepublic long getQuantity(java.lang.String pCatalogRefId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pCatalogRefId
- catalog reference idpRequest
- 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 ioprotected boolean validateGiftlistId(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
giftlistId
is valid, i.e., such a giftlist exists.
pRequest
- the servlet's requestpResponse
- the servlet's response
true
if the ID is good, false
if
the ID is invalid or there is no such giftlist
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet i/oprotected void updateOrder(CommerceItem pItem, long pQuantity, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws InvalidGiftQuantityException, java.io.IOException, javax.servlet.ServletException
pItem
- the commerce item to updatepQuantity
- the number moved to giftlist
InvalidGiftQuantityException
- if pQuantity <= 0
java.io.IOException
javax.servlet.ServletException
protected void sendScenarioEvent(Order pOrder, CommerceItem pItem, long pQuantity, java.lang.String pMsgType) throws RunProcessException
pOrder
- The order being modifiedpItem
- The CommerceItem involved in the order modificationpQuantity
- The quantity of the CommerceItem involvedpMsgType
- The JMS message type of the message in question
RunProcessException
protected java.lang.String generatePropertyPath(java.lang.String pPropertyName)
pPropertyName
- the property name to get full path
protected java.lang.String createNewShippingAddress()
public void processException(java.lang.Exception pException, java.lang.String pMsgId, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pException
- the exception to processpMsgId
- the message idpRequest
- 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 ioprotected boolean processPipelineErrors(PipelineResult pResult)
pResult
- a PipelineResult
value
public java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
locale
. This value can be
either a java.util.Locale object or a String which represents the locale.
Next if the useRequestLocale
property is true, then the locale
of the request will be returned. Finally, if the locale cannot be determined,
the the defaultLocale
property is used.
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 java.lang.String formatUserMessage(java.lang.String pKey, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pKey
- the identifier for the message to retrieve out of the ResourceBundlepRequest
- the request object which can be used to extract the user's localepResponse
- 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 ioGiftlistUserMessage
public java.lang.String formatUserMessage(java.lang.String pKey, java.lang.Object pParam, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pKey
- the identifier for the message to retrieve out of the ResourceBundlepParam
- the first (and only argument) in the messagepRequest
- 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 ioGiftlistUserMessage
public java.lang.String formatUserMessage(java.lang.String pKey, java.lang.Object pParam1, java.lang.Object pParam2, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pKey
- the identifier for the message to retrieve out of the ResourceBundlepParam1
- the first parameter in the messagepParam2
- the second parameter in the messagepRequest
- 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 ioGiftlistUserMessage
public java.lang.String formatUserMessage(java.lang.String pKey, java.lang.Object[] pParams, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pKey
- the identifier for the message to retrieve out of the ResourceBundlepParams
- a set of parameters to use in the formatting.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 ioGiftlistUserMessage
public void handlePipelineError(java.lang.Object pError, java.lang.String pErrorKey)
handlePipelineError
in interface atg.commerce.util.PipelineErrorHandler
pError
- the error reported by the pipeline.pErrorKey
- the key of the error, used for localization.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |