|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.droplet.EmptyFormHandler atg.droplet.GenericFormHandler atg.droplet.TransactionalFormHandler atg.commerce.gifts.GiftlistFormHandler atg.projects.b2bstore.purchaselists.PurchaselistFormHandlerSuper atg.projects.b2bstore.purchaselists.PurchaselistFormHandler
public class PurchaselistFormHandler
This class provides convenient form handling methods for operating on the current customer's purchase lists. It can be used to create new purchase lists, edit purchase lists, and add items to the giftlist during the shopping process.
GenericFormHandler
,
GiftlistFormHandler
Field Summary | |
---|---|
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
|
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 | |
---|---|
PurchaselistFormHandler()
|
Method Summary | |
---|---|
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. |
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, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public PurchaselistFormHandler()
Method Detail |
---|
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 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 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 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 handleSavePurchaselist(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 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 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 handleUpdatePurchaselist(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 populateGiftListFields()
protected boolean checkForListName(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
protected java.util.Locale getLocale(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
pRequest
- the servlet's request
protected 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |