Package org.apache.juneau.html
Class BasicHtmlDocTemplate
java.lang.Object
org.apache.juneau.html.BasicHtmlDocTemplate
- All Implemented Interfaces:
HtmlDocTemplate
A basic template for the HTML doc serializer.
This class can be subclassed to customize page rendering.
See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.juneau.html.HtmlDocTemplate
HtmlDocTemplate.Void
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
article
(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of the
element.<body> /<article> protected void
aside
(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of the
element.<body> /<aside> protected void
body
(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of the
element.<body> protected void
footer
(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of the
element.<body> /<footer> protected boolean
hasAside
(HtmlDocSerializerSession session) Returnstrue if this page should render a
element.<body> /<aside> protected boolean
hasFooter
(HtmlDocSerializerSession session) Returnstrue if this page should render a
element.<body> /<footer> protected boolean
hasHeader
(HtmlDocSerializerSession session) Returnstrue if this page should render a
element.<body> /<header> protected boolean
hasNav
(HtmlDocSerializerSession session) Returnstrue if this page should render a
element.<body> /<nav> protected boolean
hasScript
(HtmlDocSerializerSession session) Returnstrue if this page should render a
element.<head> /<script> protected boolean
hasStyle
(HtmlDocSerializerSession session) Returnstrue if this page should render a
element.<head> /<style> protected void
head
(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of the
element.<head> protected void
header
(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of the
element.<body> /<header> protected void
nav
(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of the
element.<body> /<nav> protected void
script
(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of the
element.<head> /<script> protected void
style
(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of the
element.<head> /<style> void
writeTo
(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of the
element.<head>
-
Constructor Details
-
BasicHtmlDocTemplate
public BasicHtmlDocTemplate()
-
-
Method Details
-
writeTo
Description copied from interface:HtmlDocTemplate
Renders the contents of the
element.<head> - Specified by:
writeTo
in interfaceHtmlDocTemplate
- Parameters:
session
- The current serializer session.w
- The writer being written to.o
- The object being serialized.- Throws:
Exception
- Any exception can be thrown.
-
head
Renders the contents of the
element.<head> - Parameters:
session
- The current serializer session.w
- The writer being written to.o
- The object being serialized.- Throws:
Exception
- Any exception can be thrown.
-
style
Renders the contents of the
element.<head> /<style> - Parameters:
session
- The current serializer session.w
- The writer being written to.o
- The object being serialized.- Throws:
Exception
- Any exception can be thrown.
-
script
Renders the contents of the
element.<head> /<script> - Parameters:
session
- The current serializer session.w
- The writer being written to.o
- The object being serialized.- Throws:
Exception
- Any exception can be thrown.
-
body
Renders the contents of the
element.<body> - Parameters:
session
- The current serializer session.w
- The writer being written to.o
- The object being serialized.- Throws:
Exception
- Any exception can be thrown.
-
header
Renders the contents of the
element.<body> /<header> - Parameters:
session
- The current serializer session.w
- The writer being written to.o
- The object being serialized.- Throws:
Exception
- Any exception can be thrown.
-
aside
Renders the contents of the
element.<body> /<aside> - Parameters:
session
- The current serializer session.w
- The writer being written to.o
- The object being serialized.- Throws:
Exception
- Any exception can be thrown.
-
article
Renders the contents of the
element.<body> /<article> - Parameters:
session
- The current serializer session.w
- The writer being written to.o
- The object being serialized.- Throws:
Exception
- Any exception can be thrown.
-
hasStyle
Returnstrue if this page should render a
element.<head> /<style> - Parameters:
session
- The current serializer session.- Returns:
- A boolean flag.
-
hasScript
Returnstrue if this page should render a
element.<head> /<script> - Parameters:
session
- The current serializer session.- Returns:
- A boolean flag.
-
hasHeader
Returnstrue if this page should render a
element.<body> /<header> - Parameters:
session
- The current serializer session.- Returns:
- A boolean flag.
-
hasAside
Returnstrue if this page should render a
element.<body> /<aside> - Parameters:
session
- The current serializer session.- Returns:
- A boolean flag.
-