public class AdmVerifySiteImages extends MainServlet
Modifier and Type | Class and Description |
---|---|
protected class |
AdmVerifySiteImages.Context
Inner class used to store servlet context information.
|
class |
AdmVerifySiteImages.Verified
Inner class that defines a verified image for the verified list.
|
FlashServlet.Stack
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
JQUERY_PATH
The file path where jquery components are located.
|
private static long |
serialVersionUID
The class' serialization version id.
|
protected static java.lang.String |
SN_EXISTING_LIST
The session's key for the current list of existing images.
|
protected static java.lang.String |
SN_MISSING_LIST
The session's key for the current list of missing images.
|
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 |
---|
AdmVerifySiteImages() |
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 |
doTypeRequest(AdmVerifySiteImages.Context ctx)
Determines if an info type request has been made and, if so, redirects so
the type is included in a new servlet request's parameters.
|
protected boolean |
editFormFields(BaseServlet.Context baseCtx)
Edits the values from the html template's form fields.
|
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 |
getRelativePath(AdmVerifySiteImages.Context ctx,
java.io.File file)
Returns a file's relative path per the current root being processed.
|
protected java.lang.String |
getTemplateName(BaseServlet.Context baseCtx)
Returns the name of the html template file used by the servlet.
|
protected boolean |
isJQueryImages(java.lang.String filepath)
Answers if a file path is for a query images folder.
|
protected boolean |
isProductImages(java.lang.String filepath)
Answers if a file path is for a product images folder.
|
protected void |
parseFile(AdmVerifySiteImages.Context ctx,
java.io.File file)
Parses a file's references to images and determines if the references are
to existing or missing images.
|
protected void |
readParameters(BaseServlet.Context baseCtx,
boolean post)
Reads the parameters passed to the servlet via the http request object.
|
protected void |
recurseFiles(AdmVerifySiteImages.Context ctx,
java.io.File file)
Recurses through the site's email templates, html templates, script files
and style sheet files and detemines missing, referenced and unreferenced
images.
|
protected void |
recurseImages(AdmVerifySiteImages.Context ctx,
java.io.File file)
Recurses through the site's images and stores a set of existing images.
|
protected void |
recurseProperties(AdmVerifySiteImages.Context ctx,
java.io.File file)
Recurses through the site's properties files and detemines missing,
referenced and unreferenced images.
|
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.
|
protected java.lang.String |
subtractRoot(AdmVerifySiteImages.Context ctx,
java.io.File file)
Substracts (removes) the path for the current root being processed from a
file's path.
|
protected boolean |
verifyImages(AdmVerifySiteImages.Context ctx)
Verifies the site images and determines which images are missing, which
images are referenced and which images are unreferenced.
|
confirmSession, getPreviousCategoryList, getPreviousCategoryPath, hasSubcategories, hasSubcategories, isOmitNoStock, isPreshopRequest, 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 static final java.lang.String SN_EXISTING_LIST
protected static final java.lang.String SN_MISSING_LIST
protected static final java.lang.String JQUERY_PATH
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.protected boolean doTypeRequest(AdmVerifySiteImages.Context ctx)
ctx
- (Context) The current servlet context.true
if this is a type request and a redirect
has been invoked, otherwise false
.protected boolean verifyImages(AdmVerifySiteImages.Context ctx)
ctx
- (Context) The current servlet context.true
if the verifcation is successful,
otherwise false
.protected void recurseImages(AdmVerifySiteImages.Context ctx, java.io.File file) throws java.lang.Exception
ctx
- (Context) The current servlet context.file
- (File) A File
object for the file or folder to be
processed.
throws Exception - if an error occurs during processing.java.lang.Exception
protected void recurseFiles(AdmVerifySiteImages.Context ctx, java.io.File file) throws java.lang.Exception
ctx
- (Context) The current servlet context.file
- (File) A File
object for the file or folder to be
processed.
throws Exception - if an error occurs during processing.java.lang.Exception
protected void recurseProperties(AdmVerifySiteImages.Context ctx, java.io.File file) throws java.lang.Exception
ctx
- (Context) The current servlet context.file
- (File) A File
object for the file or folder to be
processed.
throws Exception - if an error occurs during processing.java.lang.Exception
protected void parseFile(AdmVerifySiteImages.Context ctx, java.io.File file) throws java.lang.Exception
ctx
- (Context) The current servlet context.file
- (File) A File
object for the file or folder to be
processed.java.lang.Exception
- - if an error occurs during processing.protected java.lang.String getRelativePath(AdmVerifySiteImages.Context ctx, java.io.File file) throws java.lang.Exception
ctx
- (Context) The current servlet context.file
- (File) A File
object for a file.java.lang.Exception
- - if an error occurs during processing.protected boolean isJQueryImages(java.lang.String filepath) throws java.lang.Exception
true
if the path is for a jquery images
folder, otherwise false
.java.lang.Exception
- - if an error occurs during processing.protected boolean isProductImages(java.lang.String filepath) throws java.lang.Exception
true
if the path is for a product images
folder, otherwise false
.java.lang.Exception
- - if an error occurs during processing.protected java.lang.String subtractRoot(AdmVerifySiteImages.Context ctx, java.io.File file) throws java.lang.Exception
ctx
- (Context) The current servlet context.file
- (File) A File
object for a file.java.lang.Exception
- - if an error occurs during processing.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.