java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.aoapps.web.resources.servlet.PageServlet
com.aoapps.web.framework.WebPage
com.aoapps.web.framework.TreePage
- All Implemented Interfaces:
Serializable
,Servlet
,ServletConfig
- Direct Known Subclasses:
AutoSiteMap
A tree page creates a user interactive hierarchical representation of the site tree structure.
- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Indicates the TreePage should automatically select the correct mode, this is the default if the parameter is not provided.static final String
Indicates the TreePage should display its contents in an interactive format.static final String
Indicates the TreePage should display its contents in a text-only format.static final int
The color of the lines.static final String
The parameter name to control the TreePage display mode.Fields inherited from class com.aoapps.web.framework.WebPage
emptyWebPageArray, reHTMLPattern, SEARCH_TWO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
doGet
(WebSiteRequest req, HttpServletResponse resp) Prepares the request then invokesWebPage.doGet(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.DocumentEE)
.<__ extends FlowContent<__>>
voiddoGet
(WebSiteRequest req, HttpServletResponse resp, WebPageLayout layout, __ flow) By default, GET provides no content.void
doPost
(WebSiteRequest req, HttpServletResponse resp) Prepares the request then invokesWebPage.doPost(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.DocumentEE)
.long
getLastModified
(WebSiteRequest req, HttpServletResponse resp) ThegetLastModified
defaults to-1
.long
Gets the last modified time for search indexing.protected abstract List
<? extends TreePageData> getTree
(WebSiteRequest req, HttpServletResponse resp) Gets the tree to be displayed.protected boolean
abstract boolean
Methods inherited from class com.aoapps.web.framework.WebPage
canAccess, configureResources, doGet, doGet, doPost, doPost, doPost, doPostWithSearch, equals, equals, generateUrlPath, getAuthor, getAuthorHref, getAutonli, getCachedChildren, getChildren, getClassLastModified, getContentValign, getCopyright, getDescription, getDoctype, getDocument, getHtmlOutputStream, getIndent, getJavascriptSrc, getKeywords, getLastModified, getLastModifiedRecursive, getLastModifiedRecursive, getNavImageAlt, getNavImageSuffix, getNavImageUrl, getNextPage, getOnloadScript, getPageIndexInParent, getParent, getPreferredContentWidth, getPreviousPage, getRedirectType, getRedirectUrl, getRootPage, getSerialization, getServletContext, getShortTitle, getTitle, getUptime, getUrlParams, getUrlPath, getUrlPattern, getWebPage, getWebPage, getWebPage, getWebPage, getWebPage, getWebPage, getWebPageAndChildrenLastModified, getWebPageLayout, getWebSiteRequest, hashCode, includeNavImageAsParent, isHandler, isHandler, loadClass, printLoginForm, printUnauthorizedPage, search, service, setHeaders, showInLocationPath, standardSearch, useNavImage, useSiteMap
Methods inherited from class com.aoapps.web.resources.servlet.PageServlet
service
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletInfo, getServletName, init, init, log, log
-
Field Details
-
TREE_LINE_COLOR
public static final int TREE_LINE_COLORThe color of the lines.- See Also:
-
TREEPAGE_MODE
The parameter name to control the TreePage display mode.- See Also:
-
MODE_AUTO
Indicates the TreePage should automatically select the correct mode, this is the default if the parameter is not provided.- See Also:
-
MODE_TEXT
Indicates the TreePage should display its contents in a text-only format.- See Also:
-
MODE_GUI
Indicates the TreePage should display its contents in an interactive format.- See Also:
-
-
Constructor Details
-
TreePage
public TreePage()
-
-
Method Details
-
doGet
public void doGet(WebSiteRequest req, HttpServletResponse resp) throws ServletException, IOException Description copied from class:WebPage
Prepares the request then invokesWebPage.doGet(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.DocumentEE)
. To not have these steps automatically applied, override this method. By the time this method is called, security checks, authentication, and redirects have been done.- Sets the serialization.
- Sets the DOCTYPE.
- Gets the
response writer
. - Invokes
WebPage.doGet(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.DocumentEE)
.
- Overrides:
doGet
in classWebPage
- Throws:
ServletException
IOException
- See Also:
-
getSearchLastModified
Description copied from class:WebPage
Gets the last modified time for search indexing. The index will be recreated if the search last modified time is changed. If this method returns-1
, no search index is built. This defaults to be a call togetLastModified
with nullWebSiteRequest
andHttpServletResponse
.- Overrides:
getSearchLastModified
in classWebPage
- Throws:
ServletException
-
getLastModified
Description copied from class:WebPage
ThegetLastModified
defaults to-1
.- Overrides:
getLastModified
in classWebPage
-
doGet
public <__ extends FlowContent<__>> void doGet(WebSiteRequest req, HttpServletResponse resp, WebPageLayout layout, __ flow) throws ServletException, IOException Description copied from class:WebPage
By default, GET provides no content.- Overrides:
doGet
in classWebPage
- Parameters:
req
- theWebSiteRequest
for this request, ornull
when searchingresp
- theHttpServletResponse
for this request, ornull
when searchinglayout
- theWebPageLayout
that has been appliedflow
- theFlowContent
to send output to- Throws:
ServletException
IOException
- See Also:
-
doPost
public void doPost(WebSiteRequest req, HttpServletResponse resp) throws ServletException, IOException Description copied from class:WebPage
Prepares the request then invokesWebPage.doPost(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.DocumentEE)
. To not have these steps automatically applied, override this method. By the time this method is called, security checks, authentication, and redirects have been done.- Sets the serialization.
- Sets the DOCTYPE.
- Gets the
response writer
. - Invokes
WebPage.doPost(com.aoapps.web.framework.WebSiteRequest, javax.servlet.http.HttpServletResponse, com.aoapps.html.servlet.DocumentEE)
.
- Overrides:
doPost
in classWebPage
- Throws:
ServletException
IOException
- See Also:
-
getTree
protected abstract List<? extends TreePageData> getTree(WebSiteRequest req, HttpServletResponse resp) throws ServletException Gets the tree to be displayed. Each row consists of three elements: path, href, description- Throws:
ServletException
-
useCodeFont
-
useSmoothOutline
-