|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.sitemesh.compatability.Content2HTMLPage
public class Content2HTMLPage
Adapts a SiteMesh 3 Content
to a SiteMesh 2 HTMLPage
.
Field Summary | |
---|---|
private Content |
content
|
private javax.servlet.http.HttpServletRequest |
request
|
Constructor Summary | |
---|---|
Content2HTMLPage(Content content)
|
|
Content2HTMLPage(Content content,
javax.servlet.http.HttpServletRequest request)
|
Method Summary | |
---|---|
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 . |
int |
getContentLength()
Length of the Page , in the format before
it was parsed. |
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Content content
private javax.servlet.http.HttpServletRequest request
Constructor Detail |
---|
public Content2HTMLPage(Content content)
public Content2HTMLPage(Content content, javax.servlet.http.HttpServletRequest request)
Method Detail |
---|
public void writePage(java.io.Writer out) throws java.io.IOException
Page
Page
, in the format before
it was parsed, to the Writer
.
writePage
in interface Page
out
- Writer to write to.
java.io.IOException
- Rethrown if cannot write to writer.public java.lang.String getPage()
Page
Page
in its original format.
getPage
in interface Page
Page.writePage(java.io.Writer)
public void writeBody(java.io.Writer out) throws java.io.IOException
Page
<body>
tag.
writeBody
in interface Page
java.io.IOException
public java.lang.String getBody()
Page
<body>
tag.
getBody
in interface Page
Page.writeBody(java.io.Writer)
public void writeHead(java.io.Writer out) throws java.io.IOException
HTMLPage
<head>
tag.
writeHead
in interface HTMLPage
java.io.IOException
public java.lang.String getHead()
HTMLPage
<head>
tag as a String.
getHead
in interface HTMLPage
HTMLPage.writeHead(java.io.Writer)
public java.lang.String getTitle()
Page
getTitle
in interface Page
public int getContentLength()
Page
Page
, in the format before
it was parsed.
getContentLength
in interface Page
public java.lang.String getProperty(java.lang.String name)
Page
Page
as a String
.
getProperty
in interface Page
name
- Name of property
public int getIntProperty(java.lang.String name)
Page
Page
as an int
.
Returns 0 if property not specified or not valid number.
getIntProperty
in interface Page
name
- Name of property
public long getLongProperty(java.lang.String name)
Page
Page
as a long
.
Returns 0L if property not specified or not valid number.
getLongProperty
in interface Page
name
- Name of property
private java.lang.String noNull(java.lang.String property)
public boolean getBooleanProperty(java.lang.String name)
Page
Page
as a boolean
.
Returns true if value starts with '1', 't' or 'y' (case-insensitive) -
otherwise returns false.
getBooleanProperty
in interface Page
name
- Name of property
public boolean isPropertySet(java.lang.String name)
Page
Page
has been set.
isPropertySet
in interface Page
name
- Name of property
public java.lang.String[] getPropertyKeys()
Page
Page
.
getPropertyKeys
in interface Page
public java.util.Map getProperties()
Page
Map
representing all the properties in the Page
.
getProperties
in interface Page
public boolean isFrameSet()
HTMLPage
isFrameSet
in interface HTMLPage
public void setFrameSet(boolean frameset)
HTMLPage
setFrameSet
in interface HTMLPage
HTMLPage.isFrameSet()
public javax.servlet.http.HttpServletRequest getRequest()
Page
getRequest
in interface Page
Page.getRequest()
public void setRequest(javax.servlet.http.HttpServletRequest request)
setRequest
in interface Page
Page.getRequest()
public void addProperty(java.lang.String name, java.lang.String value)
Page
addProperty
in interface Page
|
www.opensymphony.com/sitemesh/ | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |