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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidarticle(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of theelement.<body> /<article> protected voidaside(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of theelement.<body> /<aside> protected voidbody(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of theelement.<body> protected voidfooter(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of theelement.<body> /<footer> protected booleanhasAside(HtmlDocSerializerSession session) Returnstrue if this page should render aelement.<body> /<aside> protected booleanhasFooter(HtmlDocSerializerSession session) Returnstrue if this page should render aelement.<body> /<footer> protected booleanhasHeader(HtmlDocSerializerSession session) Returnstrue if this page should render aelement.<body> /<header> protected booleanhasNav(HtmlDocSerializerSession session) Returnstrue if this page should render aelement.<body> /<nav> protected booleanhasScript(HtmlDocSerializerSession session) Returnstrue if this page should render aelement.<head> /<script> protected booleanhasStyle(HtmlDocSerializerSession session) Returnstrue if this page should render aelement.<head> /<style> protected voidhead(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of theelement.<head> protected voidheader(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of theelement.<body> /<header> protected voidnav(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of theelement.<body> /<nav> protected voidscript(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of theelement.<head> /<script> protected voidstyle(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of theelement.<head> /<style> voidwriteTo(HtmlDocSerializerSession session, HtmlWriter w, Object o) Renders the contents of theelement.<head>
-
Constructor Details
-
BasicHtmlDocTemplate
public BasicHtmlDocTemplate()
-
-
Method Details
-
writeTo
Description copied from interface:HtmlDocTemplateRenders the contents of theelement.<head> - Specified by:
writeToin 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.
-
article
Renders the contents of theelement.<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.
-
aside
Renders the contents of theelement.<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.
-
body
Renders the contents of theelement.<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.
-
hasAside
Returnstrue if this page should render aelement.<body> /<aside> - Parameters:
session- The current serializer session.- Returns:
- A boolean flag.
-
hasHeader
Returnstrue if this page should render aelement.<body> /<header> - Parameters:
session- The current serializer session.- Returns:
- A boolean flag.
-
hasScript
Returnstrue if this page should render aelement.<head> /<script> - Parameters:
session- The current serializer session.- Returns:
- A boolean flag.
-
hasStyle
Returnstrue if this page should render aelement.<head> /<style> - Parameters:
session- The current serializer session.- Returns:
- A boolean flag.
-
head
Renders the contents of theelement.<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.
-
header
Renders the contents of theelement.<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.
-
script
Renders the contents of theelement.<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.
-
style
Renders the contents of theelement.<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.
-