public final class WebPageBuilder
extends java.lang.Object
List of fixed FlowTokens, using the supplied
WebPageOutputOptions to determine the exact form of the results.| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
DEFAULT_MATHJAX_URL
Default URL and config to use when MathJax configuration option has been enabled.
|
| 构造器和说明 |
|---|
WebPageBuilder(SessionContext sessionContext,
WebPageOutputOptions options) |
| 限定符和类型 | 方法和说明 |
|---|---|
org.w3c.dom.Document |
buildWebPage(java.util.List<FlowToken> fixedTokens) |
java.lang.String |
buildWebPageString(java.util.List<FlowToken> fixedTokens) |
void |
setWebPageContentType(java.lang.Object contentTypeSettable)
Calls the
setContentType method for the given Object (by reflection) to something
appropriate for serving the types of web pages generated by this builder over HTTP. |
void |
writeWebPage(java.util.List<FlowToken> fixedTokens,
java.lang.Object contentTypeSettable,
java.io.OutputStream outputStream,
SnuggleSession.EndOutputAction endOutputOptions)
Creates a web page representing the given (fixed) Tokens, and writes the results to
the given
OutputStream. |
public static final java.lang.String DEFAULT_MATHJAX_URL
public WebPageBuilder(SessionContext sessionContext, WebPageOutputOptions options)
public final org.w3c.dom.Document buildWebPage(java.util.List<FlowToken> fixedTokens) throws SnuggleParseException
public final java.lang.String buildWebPageString(java.util.List<FlowToken> fixedTokens) throws SnuggleParseException
public final void writeWebPage(java.util.List<FlowToken> fixedTokens, java.lang.Object contentTypeSettable, java.io.OutputStream outputStream, SnuggleSession.EndOutputAction endOutputOptions) throws SnuggleParseException, java.io.IOException
OutputStream.fixedTokens - fixed Tokens from earlier stages of parsingcontentTypeSettable - optional bean Object that will have its contentType
property set if provided. (This is generally useful as a proxy for the HttpResponse
Object in the servlet API, which I want to avoid a compile-time dependency on.)outputStream - Stream to send the resulting page to, which will be closed afterwards.endOutputOptions - specifies what to do with the outputStream once we've finished writing
to it.SnuggleParseExceptionjava.io.IOExceptionSnuggleRuntimeException - if calling setContentType() on the contentTypeSettable
Object failed, with the underlying Exception wrapped up.public final void setWebPageContentType(java.lang.Object contentTypeSettable)
setContentType method for the given Object (by reflection) to something
appropriate for serving the types of web pages generated by this builder over HTTP.
(The main example for this would be passing a javax.servlet.http.HttpResponse
Object, which I want to avoid a compile-time dependency on.)
contentTypeSettable - Object that will have its contentType
property set if provided.