|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.nucleus.logging.VariableArgumentApplicationLoggingImpl atg.nucleus.GenericService atg.droplet.EmptyFormHandler atg.droplet.GenericFormHandler atg.commerce.catalog.CompareSkusFormHandler
ProductComparisonList
and
ProductListHander
to create
and manage product comparison lists.
public class CompareSkusFormHandler
This form handler is used to compare two SKUs with each another.
As a user is looking at a Product, they can decided to add all of
its associated SKUs to a list of SKUs they may want to compare side by side.
When they are ready to do a comparison, they select two of the SKUs from
the list they have built up, and a table is displayed comparing
the two SKUs.
All handle methods in this form handler mirror a similar pattern. Each handleXXX process has an
associated preXXX and postXXX method. So, for example, the handleCompareSkus
has an
associated preCompareSkus
and postCompareSkus
. 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
Deprecated. Class version string |
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 | |
---|---|
CompareSkusFormHandler()
Deprecated. Empty Constructor. |
Method Summary | |
---|---|
java.lang.String |
getAddToCompareListErrorURL()
Deprecated. Returns property AddToCompareListErrorURL. |
java.lang.String |
getAddToCompareListSuccessURL()
Deprecated. Returns property AddToCompareListSuccessURL. |
java.lang.String |
getCompareSkusErrorURL()
Deprecated. This method returns property CompareSkusErrorURL. |
java.lang.String |
getCompareSkusSuccessURL()
Deprecated. Returns property CompareSkusSuccessURL. |
java.util.List |
getProductCompareList()
Deprecated. This method returns the list of Products the user wants to compare against. |
java.lang.String |
getProductToCompare()
Deprecated. Gets the productId of the Product to add to Compare List. |
Repository |
getRepository()
Deprecated. Gets the Repository the Products/SKUs are in. |
java.lang.String |
getSelectedIndex1()
Deprecated. This method returns the index of the first item the user wants to compare. |
java.lang.String |
getSelectedIndex2()
Deprecated. Returns the index of the second item the user wants to compare. |
java.util.List |
getSkuCompareList()
Deprecated. This method returns the list of SKUs the user wants to compare against. |
protected java.util.Locale |
getUsersLocale(DynamoHttpServletRequest pRequest)
Deprecated. Returns either the Locale from the Request object (if it isn't NULL), or the Locale from the JVM. |
boolean |
handleAddToCompareList(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Deprecated. This method is called when the user adds a Product (and all associated SKUs) to the Compare Lists. |
boolean |
handleCompareSkus(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Deprecated. This method is called when the user goes to compare 2 selected SKUs with each other. |
void |
postAddToCompareList(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Deprecated. This method provides an easy way for users to extend the functionality of the handleAddToCompareList method. |
void |
postCompareSkus(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Deprecated. This method provides an easy way for users to extend the functionality of the handleCompareSkus method. |
void |
preAddToCompareList(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Deprecated. This method provides an easy way for users to extend the functionality of the handleAddToCompareList method. |
void |
preCompareSkus(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Deprecated. This method provides an easy way for users to extend the functionality of the handleCompareSkus method. |
void |
processError(java.lang.Exception pException,
java.lang.String pResourceLookupKey,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Deprecated. This method is called by this form handler whenever an error is found. |
void |
setAddToCompareListErrorURL(java.lang.String pAddToCompareListErrorURL)
Deprecated. Sets property AddToCompareListErrorURL. |
void |
setAddToCompareListSuccessURL(java.lang.String pAddToCompareListSuccessURL)
Deprecated. Sets the property AddToCompareListSuccessURL. |
void |
setCompareSkusErrorURL(java.lang.String pCompareSkusErrorURL)
Deprecated. Sets property CompareSkusErrorURL. |
void |
setCompareSkusSuccessURL(java.lang.String pCompareSkusSuccessURL)
Deprecated. Sets property CompareSkusSuccessURL. |
void |
setProductCompareList(java.util.List pProductCompareList)
Deprecated. Sets the list of Products the user wants to compare against. |
void |
setProductToCompare(java.lang.String productId)
Deprecated. Sets the productId of the Product to add to the Compare Lists. |
void |
setRepository(Repository pRepository)
Deprecated. Sets the Repository the Products/SKUs are in. |
void |
setSelectedIndex1(java.lang.String newVal)
Deprecated. Sets the index of the first item the user wants to compare. |
void |
setSelectedIndex2(java.lang.String newVal)
Deprecated. Sets the index of the second item the user wants to compare. |
void |
setSkuCompareList(java.util.List pSkuCompareList)
Deprecated. Sets the list of SKUs the user wants to compare against. |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public CompareSkusFormHandler()
Method Detail |
---|
public void setRepository(Repository pRepository)
pRepository
- The repository containing the Products and SKUs the user will be comparing.public Repository getRepository()
public void setProductCompareList(java.util.List pProductCompareList)
pProductCompareList
- A list of Products the user is comparing (contains duplicates).public java.util.List getProductCompareList()
public void setSkuCompareList(java.util.List pSkuCompareList)
pSkuCompareList
- A list of SKUs the user is comparing.public java.util.List getSkuCompareList()
public void setSelectedIndex1(java.lang.String newVal)
newVal
- The new value to set the SelectedIndex1 property to. Should be between
0 and the length of the SkuCompareList/ProductCompareList.public java.lang.String getSelectedIndex1()
public void setSelectedIndex2(java.lang.String newVal)
newVal
- The new value to set the SelectedIndex2 property to. Should be between
0 and the length of the SkuCompareList/ProductCompareList.public java.lang.String getSelectedIndex2()
public void setProductToCompare(java.lang.String productId)
productId
- The Id of the Product whose SKUs the user wants added to the Compare Lists.public java.lang.String getProductToCompare()
public void setAddToCompareListSuccessURL(java.lang.String pAddToCompareListSuccessURL)
pAddToCompareListSuccessURL
- The URL (as a string) of the page to redirect to if
the handleAddToCompareList method succeeds without error.public java.lang.String getAddToCompareListSuccessURL()
public void setAddToCompareListErrorURL(java.lang.String pAddToCompareListErrorURL)
pAddToCompareListErrorURL
- The URL (as a string) of the page to redirect to if
the handleAddToCompareList method generates an error.public java.lang.String getAddToCompareListErrorURL()
public void preAddToCompareList(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic void postAddToCompareList(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic boolean handleAddToCompareList(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic void setCompareSkusSuccessURL(java.lang.String pCompareSkusSuccessURL)
pCompareSkusSuccessURL
- The URL (as a string) of the page to redirect to if
the handleCompareSkus method succeeds with no errors.public java.lang.String getCompareSkusSuccessURL()
public void setCompareSkusErrorURL(java.lang.String pCompareSkusErrorURL)
pCompareSkusErrorURL
- The URL (as a string) of the page to redirect to if
the handleCompareSkus method generates errors.public java.lang.String getCompareSkusErrorURL()
public void preCompareSkus(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic void postCompareSkus(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet iopublic boolean handleCompareSkus(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 java.util.Locale getUsersLocale(DynamoHttpServletRequest pRequest)
pRequest
- the servlet's request
public void processError(java.lang.Exception pException, java.lang.String pResourceLookupKey, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the servlet's requestpResponse
- the servlet's response
javax.servlet.ServletException
- if there was an error while executing the code
java.io.IOException
- if there was an error with servlet IO
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |