| Modifier and Type | Field and Description |
|---|---|
private Content |
content |
private javax.servlet.http.HttpServletRequest |
request |
| Constructor and Description |
|---|
Content2HTMLPage(Content content,
javax.servlet.http.HttpServletRequest request) |
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(java.lang.String name,
java.lang.String value)
Manually add a property to page.
|
java.lang.String |
getBody()
Convenience method to return the contents of the
<body> tag. |
boolean |
getBooleanProperty(java.lang.String name)
Get a property embedded into the
Page as a boolean. |
java.lang.String |
getHead()
Convenience method to return the contents of the
<head> tag as a String. |
int |
getIntProperty(java.lang.String name)
Get a property embedded into the
Page as an int. |
long |
getLongProperty(java.lang.String name)
Get a property embedded into the
Page as a long. |
java.lang.String |
getPage()
Convenience method to return the contents of the
Page in its original format. |
java.util.Map |
getProperties()
Get a
Map representing all the properties in the Page. |
java.lang.String |
getProperty(java.lang.String name)
Get a property embedded into the
Page as a String. |
java.lang.String[] |
getPropertyKeys()
Get all available property keys for the
Page. |
javax.servlet.http.HttpServletRequest |
getRequest()
Return the request of the original page.
|
java.lang.String |
getTitle()
Get the Title of the document
|
boolean |
isFrameSet()
Check to see if this page contains an
HTML frameset.
|
boolean |
isPropertySet(java.lang.String name)
Determine whether a property embedded into the
Page has been set. |
private java.lang.String |
noNull(java.lang.String property) |
void |
setFrameSet(boolean frameset)
Marks this page as a frameset.
|
void |
setRequest(javax.servlet.http.HttpServletRequest request)
Create snapshot of Request.
|
void |
writeBody(java.io.Writer out)
Write the contents of the
<body> tag. |
void |
writeHead(java.io.Writer out)
Write the contents of the
<head> tag. |
void |
writePage(java.io.Writer out)
Write the entire contents of the
Page, in the format before
it was parsed, to the Writer. |
private final Content content
private javax.servlet.http.HttpServletRequest request
public Content2HTMLPage(Content content, javax.servlet.http.HttpServletRequest request)
public void writePage(java.io.Writer out)
throws java.io.IOException
PagePage, in the format before
it was parsed, to the Writer.public java.lang.String getPage()
PagePage in its original format.getPage in interface PagePage.writePage(java.io.Writer)public void writeBody(java.io.Writer out)
throws java.io.IOException
Page<body> tag.public java.lang.String getBody()
Page<body> tag.getBody in interface PagePage.writeBody(java.io.Writer)public void writeHead(java.io.Writer out)
throws java.io.IOException
HTMLPage<head> tag.public java.lang.String getHead()
HTMLPage<head> tag as a String.getHead in interface HTMLPageHTMLPage.writeHead(java.io.Writer)public java.lang.String getTitle()
Pagepublic java.lang.String getProperty(java.lang.String name)
PagePage as a String.getProperty in interface Pagename - Name of propertypublic int getIntProperty(java.lang.String name)
PagePage as an int.
Returns 0 if property not specified or not valid number.getIntProperty in interface Pagename - Name of propertypublic long getLongProperty(java.lang.String name)
PagePage as a long.
Returns 0L if property not specified or not valid number.getLongProperty in interface Pagename - Name of propertyprivate java.lang.String noNull(java.lang.String property)
public boolean getBooleanProperty(java.lang.String name)
PagePage as a boolean.
Returns true if value starts with '1', 't' or 'y' (case-insensitive) -
otherwise returns false.getBooleanProperty in interface Pagename - Name of propertypublic boolean isPropertySet(java.lang.String name)
PagePage has been set.isPropertySet in interface Pagename - Name of propertypublic java.lang.String[] getPropertyKeys()
PagePage.getPropertyKeys in interface Pagepublic java.util.Map getProperties()
PageMap representing all the properties in the Page.getProperties in interface Pagepublic boolean isFrameSet()
HTMLPageisFrameSet in interface HTMLPagepublic void setFrameSet(boolean frameset)
HTMLPagesetFrameSet in interface HTMLPageHTMLPage.isFrameSet()public javax.servlet.http.HttpServletRequest getRequest()
PagegetRequest in interface PagePage.getRequest()public void setRequest(javax.servlet.http.HttpServletRequest request)
setRequest in interface PagePage.getRequest()public void addProperty(java.lang.String name,
java.lang.String value)
PageaddProperty in interface Page