public class AdmViewDatabaseInfo extends MainServlet
Modifier and Type | Class and Description |
---|---|
protected class |
AdmViewDatabaseInfo.Context
Inner class used to store servlet context information.
|
class |
AdmViewDatabaseInfo.Row
Inner class used to define a row of displayed information.
|
FlashServlet.Stack
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
The class' serialization version id.
|
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 |
---|
AdmViewDatabaseInfo() |
Modifier and Type | Method and Description |
---|---|
protected MainServlet.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.
|
private java.lang.String |
getColumnDefault(java.lang.String datatype,
java.lang.String nullable)
Returns the dbinfo.properties column default value for the given data
type and nullable attribute.
|
private java.lang.String |
getColumnDescription(java.lang.String tblname,
java.lang.String colname)
Returns the dbinfo.properties column description for the given table and
column.
|
private java.lang.String |
getMethodDescription(java.lang.String method)
Returns the dbinfo.properties features method description for the given
method name.
|
private java.lang.String |
getMethodReturnValue(java.lang.String value)
Returns a revised features method return value.
|
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.).
|
private java.lang.String |
getSQLTypeName(AdmViewDatabaseInfo.Context ctx,
java.lang.Object typenum)
Returns the text description for the given sql type number.
|
private java.lang.String |
getTableDescription(java.lang.String tblname)
Returns the dbinfo.properties table description for the given table.
|
private void |
getTableOrViewInfo(java.sql.ResultSet rs,
java.util.TreeMap<java.lang.String,AdmViewDatabaseInfo.Row> sorted)
Reads the given result set of table or view data and adds it to the
given tree map of sorted information.
|
protected java.lang.String |
getTemplateName(BaseServlet.Context baseCtx)
Returns the name of the html template file used by the servlet.
|
private java.lang.String |
getYesNoDescription(java.lang.String type,
java.lang.String code)
Returns the dbinfo.properties yes/no description for the given type and
code.
|
protected boolean |
isPreshopRequest(MainServlet.Context ctx)
Answers if a request has been made that uses the preshop layout (no banner
links, no navigation bar options and no displayed categories).
|
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 |
setCookieValues(BaseServlet.Context baseCtx)
Adds one or more values to the http session cookies.
|
protected void |
setSessionValues(BaseServlet.Context baseCtx)
Adds one or more values to the http session object.
|
protected void |
setTemplateData(BaseServlet.Context baseCtx)
Sets the various data required by the html template.
|
private void |
setTemplateFeaturesInfo(AdmViewDatabaseInfo.Context ctx)
Sets the template data for supported features information.
|
private void |
setTemplateSQLTypesInfo(AdmViewDatabaseInfo.Context ctx)
Sets the template data for supported SQL types information.
|
private void |
setTemplateTableColInfo(AdmViewDatabaseInfo.Context ctx)
Sets the template data for table column information.
|
private void |
setTemplateTableColSels(AdmViewDatabaseInfo.Context ctx)
Sets the template data for table column information selections.
|
private void |
setTemplateTableIdxInfo(AdmViewDatabaseInfo.Context ctx)
Sets the template data for table index information.
|
private void |
setTemplateTableSumInfo(AdmViewDatabaseInfo.Context ctx)
Sets the template data for table summary information.
|
confirmSession, getPreviousCategoryList, getPreviousCategoryPath, hasSubcategories, hasSubcategories, isOmitNoStock, isUserHelpRequest, setTemplateCategoryPath, sortCategoryProductData, writePageImpl
confirmCart, confirmRequest, confirmRetail, confirmWholesale, createNewCart, createNewSessionImpl, getPageTitle, getServletPath, getUser, initTemplateDataImpl, isLogonRequest, requestComplete, requiresLogon, 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 isPreshopRequest(MainServlet.Context ctx)
false
. This method should be overridden by a subclass if the
subclass requires something different than the default.
Overrides isPreshopRequest
in MainServlet
.isPreshopRequest
in class MainServlet
ctx
- (Context) The current servlet context.true
if this is a request for preshop,
otherwise false
.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 BaseServlet
.readParameters
in class BaseServlet
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 setCookieValues(BaseServlet.Context baseCtx) throws java.io.IOException
writeURL
method. Calls should be made to writeCookie
for each cookie that needs to be set.
Overrides setCookieValues
in BaseServlet
.setCookieValues
in class BaseServlet
baseCtx
- (Context) The current servlet context.java.io.IOException
- - if an error occurs when adding the
cookie to the response header.protected void setSessionValues(BaseServlet.Context baseCtx)
writeURL
method.
Overrides setSessionValues
in BaseServlet
.setSessionValues
in class BaseServlet
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.private void setTemplateFeaturesInfo(AdmViewDatabaseInfo.Context ctx) throws java.lang.Exception
ctx
- (Context) The servlet's current context.java.lang.Exception
- - if an error occurs while generating the template data.private void setTemplateSQLTypesInfo(AdmViewDatabaseInfo.Context ctx) throws java.lang.Exception
ctx
- (Context) The servlet's current context.java.lang.Exception
- - if an error occurs while generating the template data.private void setTemplateTableColInfo(AdmViewDatabaseInfo.Context ctx) throws java.lang.Exception
ctx
- (Context) The servlet's current context.java.lang.Exception
- - if an error occurs while generating the template data.private void setTemplateTableColSels(AdmViewDatabaseInfo.Context ctx) throws java.lang.Exception
ctx
- (Context) The servlet's current context.java.lang.Exception
- - if an error occurs while generating the template data.private void setTemplateTableIdxInfo(AdmViewDatabaseInfo.Context ctx) throws java.lang.Exception
ctx
- (Context) The servlet's current context.java.lang.Exception
- - if an error occurs while generating the template data.private void setTemplateTableSumInfo(AdmViewDatabaseInfo.Context ctx) throws java.lang.Exception
ctx
- (Context) The servlet's current context.java.lang.Exception
- - if an error occurs while generating the template data.private java.lang.String getColumnDefault(java.lang.String datatype, java.lang.String nullable)
datatype
- (String) An SQL data type description.nullable
- (String) An "is_nullable" value ("yes" or "no").private java.lang.String getColumnDescription(java.lang.String tblname, java.lang.String colname)
tblname
- (String) The name of a table.colname
- (String) The name of a column in the given table.private java.lang.String getMethodDescription(java.lang.String method)
method
- (String) The name of a method.private java.lang.String getMethodReturnValue(java.lang.String value)
value
- (String) A method return value.private java.lang.String getSQLTypeName(AdmViewDatabaseInfo.Context ctx, java.lang.Object typenum) throws java.lang.Exception
ctx
- (Context) The servlet's current context.typenum
- (Object) The number for the desired type description.java.lang.Exception
- - if an error occurs while determining the type
description.private java.lang.String getTableDescription(java.lang.String tblname)
tblname
- (String) The name of a table.private void getTableOrViewInfo(java.sql.ResultSet rs, java.util.TreeMap<java.lang.String,AdmViewDatabaseInfo.Row> sorted) throws java.lang.Exception
rs
- (ResultSet) A result set of table or view data.sorted
- (TreeMap) The tree map to add the information to.java.lang.Exception
- - if an error occurs while processing the result set.private java.lang.String getYesNoDescription(java.lang.String type, java.lang.String code)
type
- (String) The type of description to retrieve.code
- (String) The code for the description to retrieve.protected MainServlet.Context createContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
createContext
in MainServlet
.
Invoked by doPost
and doGet
methods.createContext
in class MainServlet
request
- (HttpServletRequest) The servlet's incoming request.response
- (HttpServletResponse) The servlet's outgoing response.