Class Content2HTMLPage
java.lang.Object
com.opensymphony.sitemesh.compatability.Content2HTMLPage
- Since:
- SiteMesh 3
-
Constructor Summary
ConstructorsConstructorDescriptionContent2HTMLPage(Content content, jakarta.servlet.http.HttpServletRequest request) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String name, String value) Manually add a property to page.getBody()Convenience method to return the contents of the<body>tag.booleangetBooleanProperty(String name) Get a property embedded into thePageas aboolean.intLength of thePage, in the format before it was parsed.getHead()Convenience method to return the contents of the<head>tag as a String.intgetIntProperty(String name) Get a property embedded into thePageas anint.longgetLongProperty(String name) Get a property embedded into thePageas along.getPage()Convenience method to return the contents of thePagein its original format.Get aMaprepresenting all the properties in thePage.getProperty(String name) Get a property embedded into thePageas aString.String[]Get all available property keys for thePage.jakarta.servlet.http.HttpServletRequestReturn the request of the original page.getTitle()Get the Title of the documentbooleanCheck to see if this page contains an HTML frameset.booleanisPropertySet(String name) Determine whether a property embedded into thePagehas been set.voidsetFrameSet(boolean frameset) Marks this page as a frameset.voidsetRequest(jakarta.servlet.http.HttpServletRequest request) Create snapshot of Request.voidWrite the contents of the<body>tag.voidWrite the contents of the<head>tag.voidWrite the entire contents of thePage, in the format before it was parsed, to theWriter.
-
Constructor Details
-
Content2HTMLPage
-
-
Method Details
-
writePage
Description copied from interface:PageWrite the entire contents of thePage, in the format before it was parsed, to theWriter.- Specified by:
writePagein interfacePage- Parameters:
out- Writer to write to.- Throws:
IOException- Rethrown if cannot write to writer.
-
getPage
Description copied from interface:PageConvenience method to return the contents of thePagein its original format. -
writeBody
Description copied from interface:PageWrite the contents of the<body>tag.- Specified by:
writeBodyin interfacePage- Throws:
IOException
-
getBody
Description copied from interface:PageConvenience method to return the contents of the<body>tag. -
writeHead
Description copied from interface:HTMLPageWrite the contents of the<head>tag.- Specified by:
writeHeadin interfaceHTMLPage- Throws:
IOException
-
getHead
Description copied from interface:HTMLPageConvenience method to return the contents of the<head>tag as a String. -
getTitle
Description copied from interface:PageGet the Title of the document -
getContentLength
public int getContentLength()Description copied from interface:PageLength of thePage, in the format before it was parsed.- Specified by:
getContentLengthin interfacePage- Returns:
- Length of page data (in number of bytes).
-
getProperty
Description copied from interface:PageGet a property embedded into thePageas aString.- Specified by:
getPropertyin interfacePage- Parameters:
name- Name of property- Returns:
- Property value
-
getIntProperty
Description copied from interface:PageGet a property embedded into thePageas anint. Returns 0 if property not specified or not valid number.- Specified by:
getIntPropertyin interfacePage- Parameters:
name- Name of property- Returns:
- Property value
-
getLongProperty
Description copied from interface:PageGet a property embedded into thePageas along. Returns 0L if property not specified or not valid number.- Specified by:
getLongPropertyin interfacePage- Parameters:
name- Name of property- Returns:
- Property value
-
getBooleanProperty
Description copied from interface:PageGet a property embedded into thePageas aboolean. Returns true if value starts with '1', 't' or 'y' (case-insensitive) - otherwise returns false.- Specified by:
getBooleanPropertyin interfacePage- Parameters:
name- Name of property- Returns:
- Property value
-
isPropertySet
Description copied from interface:PageDetermine whether a property embedded into thePagehas been set.- Specified by:
isPropertySetin interfacePage- Parameters:
name- Name of property- Returns:
- Whether it has been set
-
getPropertyKeys
Description copied from interface:PageGet all available property keys for thePage.- Specified by:
getPropertyKeysin interfacePage- Returns:
- Property keys
-
getProperties
Description copied from interface:PageGet aMaprepresenting all the properties in thePage.- Specified by:
getPropertiesin interfacePage- Returns:
- Properties map
-
isFrameSet
public boolean isFrameSet()Description copied from interface:HTMLPageCheck to see if this page contains an HTML frameset.- Specified by:
isFrameSetin interfaceHTMLPage
-
setFrameSet
public void setFrameSet(boolean frameset) Description copied from interface:HTMLPageMarks this page as a frameset.- Specified by:
setFrameSetin interfaceHTMLPage- See Also:
-
getRequest
public jakarta.servlet.http.HttpServletRequest getRequest()Description copied from interface:PageReturn the request of the original page.- Specified by:
getRequestin interfacePage- See Also:
-
setRequest
public void setRequest(jakarta.servlet.http.HttpServletRequest request) Create snapshot of Request.- Specified by:
setRequestin interfacePage- See Also:
-
addProperty
Description copied from interface:PageManually add a property to page.- Specified by:
addPropertyin interfacePage
-