public class AccountLogonAddEdit extends AccountServlet
Modifier and Type | Class and Description |
---|---|
protected class |
AccountLogonAddEdit.Context
Inner class used to store servlet context information.
|
protected class |
AccountLogonAddEdit.SearchResult
Inner class that defines auto complete search result data that is sent
to the browser.
|
FlashServlet.Stack
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
The class' serialization version id.
|
SN_BILLINFO, SN_SHIPINFO, SN_USERINFO
DISPLAY_MODE, SN_ADMINMODE, SN_CATEGORIES, SN_CATEGORIES_LISTONLY, SN_CATEGORIES_PATH, SN_CATEGORY, SN_CONTINUE_PAGEURL, SN_PRODUCTS, SN_PRODUCTS_INSTOCK, SN_PRODUCTS_NOSTOCK, SN_PRODUCTS_PAFILTERS, SN_PRODUCTS_PAGEHIST, SN_PRODUCTS_PAGENUM, SN_PRODUCTS_PAGEURL, SOURCE_CATALOG, SOURCE_FAVORITES, SOURCE_SEARCH, SOURCE_SHOPCART, SOURCE_SPECIAL
SN_CART, SN_LOGON_STATUS, SN_SECPROFILE, SN_USER, SN_USERSFI
BROWSER_IE, BROWSER_NN, BROWSER_XX, RESP_NULL, RESP_REDIRECTED, RQST_AJAX, RQST_NULL
Constructor and Description |
---|
AccountLogonAddEdit() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
createAccount(AccountLogonAddEdit.Context ctx)
Creates the new account.
|
protected AccountServlet.Context |
createContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Creates the servlet context inner class.
|
protected boolean |
editFormFields(BaseServlet.Context baseCtx)
Edits the values from the html template's form fields.
|
protected void |
emailAccountInfo(AccountLogonAddEdit.Context ctx)
Sends an email notification containing new account info to the user.
|
protected java.lang.String |
fmtCategoryName(AccountLogonAddEdit.Context ctx,
Category cat)
Returns a formatted category name.
|
protected java.lang.String |
getNextURL(BaseServlet.Context baseCtx)
Returns the next URL (including parameters) to be processed when this
servlet's processing has been successfully completed (no edit errors, etc.).
|
protected java.lang.String |
getTemplateName(BaseServlet.Context baseCtx)
Returns the name of the html template file used by the servlet.
|
protected void |
logonToAccount(AccountLogonAddEdit.Context ctx)
Performs logon to a newly created account.
|
protected void |
readParameters(BaseServlet.Context baseCtx,
boolean post)
Reads the parameters passed to the servlet via the http request object.
|
protected void |
resetFormFields(BaseServlet.Context baseCtx)
Resets the values for the html template's form fields.
|
protected void |
search(AccountLogonAddEdit.Context ctx)
Handles processing for an auto complete search request.
|
protected void |
searchResponse(AccountLogonAddEdit.Context ctx,
java.util.ArrayList<AccountLogonAddEdit.SearchResult> results)
Sends a JSON formatted response to the browser for an auto complete
search request.
|
protected void |
setAccountValues(AccountLogonAddEdit.Context ctx)
Sets the account values using the submitted parameter values.
|
protected void |
setSessionValues(BaseServlet.Context baseCtx)
Adds one or more values to the http session object.
|
protected void |
setTemplateCategories(AccountLogonAddEdit.Context ctx)
Invoked by this class' implementation of
setTemplateData to
retrieve and set the category data required by the html template. |
protected void |
setTemplateData(BaseServlet.Context baseCtx)
Sets the various data required by the html template.
|
protected boolean |
setTemplateError(AccountLogonAddEdit.Context ctx,
java.lang.String errName)
Sets the html template error fields for the given error name.
|
protected void |
storeLogonInfo(AccountLogonAddEdit.Context ctx)
Stores the entered logon information in the session for later retrieval.
|
protected boolean |
updateAccount(AccountLogonAddEdit.Context ctx)
Controls the updating of the account's components.
|
protected void |
writeResponse(AccountLogonAddEdit.Context ctx,
java.lang.String response)
Writes a JSON formatted response to the http response output stream.
|
allowAdmin, allowCatalog, allowLogonId, assignDefaultUserCatalog, getAccountObject, getURLForAdminCreate, getURLForAdminSelect, getURLForProfile, getURLForSfiSelect, getValidDefaultCategory, isCheckOut, isOneTimeShipto, requiresLogon, runMiniSync, setAccountObject, setCookieValues, updatePageExpired
confirmSession, getPreviousCategoryList, getPreviousCategoryPath, hasSubcategories, hasSubcategories, isOmitNoStock, isPreshopRequest, isUserHelpRequest, setTemplateCategoryPath, sortCategoryProductData, writePageImpl
confirmCart, confirmRequest, confirmRetail, confirmWholesale, createNewCart, createNewSessionImpl, getPageTitle, getServletPath, getUser, initTemplateDataImpl, isLogonRequest, requestComplete, resetCart, resetCategories, resetProducts, setDefaultUser, setSessionCart, setSFIShoppingUser, useExistingSessionImpl, writeCookie
createNewSession, determineBrowser, doGet, doPost, getCookie, getInvokerName, getInvokerName, getInvokerParams, getInvokerParams, getInvokerPath, getInvokerPath, getInvokerURL, getPageParams, getRequestURL, getServletName, getServletName, getServletParams, getServletParams, getServletPath, getServletURL, getServletURL, getTemplateMessage, getTemplateMessage, getTemplateMessage, getTemplateMessage, getTemplateMessage, initTemplateData, isPrintable, isServerTomcat, log, qualifyURL, redirectURL, setP3PCompactPolicy, showSiteError, showSiteError, showSiteError, useExistingSession, writeCookie, writeTempCookie
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
private static final long serialVersionUID
protected boolean editFormFields(BaseServlet.Context baseCtx)
doPost
method.
Overrides editFormFields
in BaseServlet
.editFormFields
in class BaseServlet
baseCtx
- (Context) The current servlet context.true
if all the edits are successful,
otherwise false
.protected java.lang.String getNextURL(BaseServlet.Context baseCtx)
writeURL
method.
Overrides getNextURL
in BaseServlet
.getNextURL
in class BaseServlet
baseCtx
- (Context) The current servlet context.protected java.lang.String getTemplateName(BaseServlet.Context baseCtx)
writePage
method.
Overrides getTemplateName
in BaseServlet
.getTemplateName
in class BaseServlet
baseCtx
- (Context) The current servlet context.protected void readParameters(BaseServlet.Context baseCtx, boolean post)
doGet
and doPost
method.
Overrides readParameters
in AccountServlet
.readParameters
in class AccountServlet
baseCtx
- (Context) The current servlet context.post
- (boolean) true
if the method is invoked from
doPost
, otherwise false
.protected void resetFormFields(BaseServlet.Context baseCtx)
doGet
and doPost
methods.
Overrides resetFormFields
in BaseServlet
.resetFormFields
in class BaseServlet
baseCtx
- (Context) The current servlet context.protected void setSessionValues(BaseServlet.Context baseCtx)
writeURL
method.
Overrides setSessionValues
in AccountServlet
.setSessionValues
in class AccountServlet
baseCtx
- (Context) The current servlet context.protected void setTemplateData(BaseServlet.Context baseCtx)
writePage
method.
Overrides setTemplateData
in BaseServlet
.setTemplateData
in class BaseServlet
baseCtx
- (Context) The current servlet context.protected void setTemplateCategories(AccountLogonAddEdit.Context ctx)
setTemplateData
to
retrieve and set the category data required by the html template.ctx
- (Context) The current servlet context.protected boolean setTemplateError(AccountLogonAddEdit.Context ctx, java.lang.String errName)
ctx
- (Context) The current servlet context.errName
- (String) The name of error that is to be set, used
to determine which message (or messages) to retrieve from the
message properties.false
.protected void emailAccountInfo(AccountLogonAddEdit.Context ctx)
editFormFields
method.ctx
- (Context) The current servlet context.protected java.lang.String fmtCategoryName(AccountLogonAddEdit.Context ctx, Category cat)
setTemplateCategories
and search
methods.ctx
- (Context) The current servlet context.cat
- (Category) The category to format.protected void logonToAccount(AccountLogonAddEdit.Context ctx)
setSessionValues
when a shopping user creates a new
account.ctx
- (Context) The current servlet context.protected void setAccountValues(AccountLogonAddEdit.Context ctx)
editFormFields
method for add and edit mode.ctx
- (Context) The current servlet context.protected void storeLogonInfo(AccountLogonAddEdit.Context ctx)
editFormFields
method for add mode.ctx
- (Context) The current servlet context.protected boolean createAccount(AccountLogonAddEdit.Context ctx)
editFormFields
method for add mode.ctx
- (Context) The current servlet context.true
if the account creation completed
successfully, otherwise false
.protected boolean updateAccount(AccountLogonAddEdit.Context ctx)
Invoked by the editFormFields
method for edit mode.
ctx
- (Context) The current servlet context.true
if the account update completed
successfully, otherwise false
.protected void search(AccountLogonAddEdit.Context ctx)
ctx
- (Context) The current servlet context.protected void searchResponse(AccountLogonAddEdit.Context ctx, java.util.ArrayList<AccountLogonAddEdit.SearchResult> results)
ctx
- (Context) The current servlet context.results
- (ArrayList) The current set of search results.protected void writeResponse(AccountLogonAddEdit.Context ctx, java.lang.String response)
ctx
- (Context) The current servlet context.response
- (String) The JSON response to write.protected AccountServlet.Context createContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
createContext
in AccountServlet
.
Invoked by doPost
and doGet
methods.createContext
in class AccountServlet
request
- (HttpServletRequest) The servlet's incoming request.response
- (HttpServletResponse) The servlet's outgoing response.