za.org.coefficient.html
Class Page
java.lang.Object
za.org.coefficient.html.Page
- All Implemented Interfaces:
- java.io.Serializable
public class Page
- extends java.lang.Object
- implements java.io.Serializable
The Page object is like a sheet of paper on which the content is added.
The theme is like a set of color pens and other printing devices and
the modules are what are added to the sheet of paper. Once
everything is in place, the Page is sent to the web browser.
The Page instance is created by the CoefficientServlet object and
is passed along through the Coefficient Context to all modules.
- Version:
- $Revision: 1.26 $
- Author:
- Dylan Etkin
- See Also:
CoefficientServlet
,
Serialized Form
Method Summary |
java.lang.String |
clearModuleContent(java.lang.String moduleName)
This method can be used to clear a modules set content from the
page before it has been rendered. |
private java.lang.String |
determineTheme()
|
java.lang.String |
displayFootMessage()
|
java.lang.String |
getCenter()
|
java.lang.String |
getCenterContent()
|
java.lang.String |
getCenterContent(boolean includeNavBlock)
|
java.lang.String |
getEast()
|
java.lang.String |
getEastContent()
|
java.lang.String |
getEastContent(boolean includeNavBlock)
|
java.lang.String |
getErrors()
|
java.lang.String |
getFooter()
|
java.lang.String |
getHeader()
|
java.lang.String |
getNorth()
|
java.lang.String |
getNorthContent()
|
java.lang.String |
getNorthContent(boolean includeNavBlock)
|
java.lang.String |
getPositionForModule(java.lang.String moduleName)
|
Project |
getProject()
|
java.lang.String |
getSouth()
|
java.lang.String |
getSouthContent()
|
java.lang.String |
getSouthContent(boolean includeNavBlock)
|
java.lang.String |
getThemeWelcomeContent()
|
java.lang.String |
getWest()
|
java.lang.String |
getWestContent()
|
java.lang.String |
getWestContent(boolean includeNavBlock)
|
long |
process(java.io.PrintWriter out)
|
void |
setCenterContent(java.lang.String html,
java.lang.Integer position,
java.lang.String moduleName)
|
void |
setEastContent(java.lang.String html,
java.lang.Integer position,
java.lang.String moduleName)
|
void |
setError(java.lang.String html)
|
void |
setModuleContent(java.lang.String html,
java.lang.String name)
|
void |
setModuleContent(java.lang.String html,
java.lang.String name,
java.lang.String utilityTheme)
|
void |
setNorthContent(java.lang.String html,
java.lang.Integer position,
java.lang.String moduleName)
|
void |
setSouthContent(java.lang.String html,
java.lang.Integer position,
java.lang.String moduleName)
|
void |
setWestContent(java.lang.String html,
java.lang.Integer position,
java.lang.String moduleName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAVASCRIPT
private static final java.lang.String JAVASCRIPT
- See Also:
- Constant Field Values
SIDE_WRAP_1
private static final java.lang.String SIDE_WRAP_1
- See Also:
- Constant Field Values
SIDE_WRAP_2
private static final java.lang.String SIDE_WRAP_2
- See Also:
- Constant Field Values
SIDE_WRAP_3
private static final java.lang.String SIDE_WRAP_3
- See Also:
- Constant Field Values
SIDE_WRAP_4
private static final java.lang.String SIDE_WRAP_4
- See Also:
- Constant Field Values
SIDE_WRAP_5
private static final java.lang.String SIDE_WRAP_5
- See Also:
- Constant Field Values
NAV_BLOCK_1
private static final java.lang.String NAV_BLOCK_1
- See Also:
- Constant Field Values
NAV_BLOCK_2
private static final java.lang.String NAV_BLOCK_2
- See Also:
- Constant Field Values
NAV_BLOCK_3
private static final java.lang.String NAV_BLOCK_3
- See Also:
- Constant Field Values
context
private CoefficientContext context
errors
private java.util.ArrayList errors
project
private Project project
theme
private java.lang.String theme
- The theme used to render the page.
centerContent
private java.util.TreeMap centerContent
centerModulePositions
private java.util.HashMap centerModulePositions
eastContent
private java.util.TreeMap eastContent
eastModulePositions
private java.util.HashMap eastModulePositions
northContent
private java.util.TreeMap northContent
northModulePositions
private java.util.HashMap northModulePositions
southContent
private java.util.TreeMap southContent
southModulePositions
private java.util.HashMap southModulePositions
westContent
private java.util.TreeMap westContent
westModulePositions
private java.util.HashMap westModulePositions
centerContentMax
private int centerContentMax
eastContentMax
private int eastContentMax
northContentMax
private int northContentMax
southContentMax
private int southContentMax
westContentMax
private int westContentMax
Page
public Page()
- Constructor. The constructor just store the stream this page will
write to.
Page
public Page(CoefficientContext ctx)
getProject
public Project getProject()
getCenter
public java.lang.String getCenter()
throws java.lang.Exception
- Throws:
java.lang.Exception
setCenterContent
public void setCenterContent(java.lang.String html,
java.lang.Integer position,
java.lang.String moduleName)
getCenterContent
public java.lang.String getCenterContent()
getCenterContent
public java.lang.String getCenterContent(boolean includeNavBlock)
getEast
public java.lang.String getEast()
throws java.lang.Exception
- Throws:
java.lang.Exception
setEastContent
public void setEastContent(java.lang.String html,
java.lang.Integer position,
java.lang.String moduleName)
getEastContent
public java.lang.String getEastContent()
getEastContent
public java.lang.String getEastContent(boolean includeNavBlock)
setError
public void setError(java.lang.String html)
getErrors
public java.lang.String getErrors()
getFooter
public java.lang.String getFooter()
throws java.lang.Exception
- Throws:
java.lang.Exception
getHeader
public java.lang.String getHeader()
throws java.lang.Exception
- Throws:
java.lang.Exception
setModuleContent
public void setModuleContent(java.lang.String html,
java.lang.String name)
throws java.lang.Exception
- Throws:
java.lang.Exception
setModuleContent
public void setModuleContent(java.lang.String html,
java.lang.String name,
java.lang.String utilityTheme)
throws java.lang.Exception
- Throws:
java.lang.Exception
getNorth
public java.lang.String getNorth()
throws java.lang.Exception
- Throws:
java.lang.Exception
setNorthContent
public void setNorthContent(java.lang.String html,
java.lang.Integer position,
java.lang.String moduleName)
getNorthContent
public java.lang.String getNorthContent()
getNorthContent
public java.lang.String getNorthContent(boolean includeNavBlock)
getSouth
public java.lang.String getSouth()
throws java.lang.Exception
- Throws:
java.lang.Exception
setSouthContent
public void setSouthContent(java.lang.String html,
java.lang.Integer position,
java.lang.String moduleName)
getSouthContent
public java.lang.String getSouthContent()
getSouthContent
public java.lang.String getSouthContent(boolean includeNavBlock)
getThemeWelcomeContent
public java.lang.String getThemeWelcomeContent()
throws java.lang.Exception
- Throws:
java.lang.Exception
getWest
public java.lang.String getWest()
throws java.lang.Exception
- Throws:
java.lang.Exception
setWestContent
public void setWestContent(java.lang.String html,
java.lang.Integer position,
java.lang.String moduleName)
getWestContent
public java.lang.String getWestContent()
getWestContent
public java.lang.String getWestContent(boolean includeNavBlock)
displayFootMessage
public java.lang.String displayFootMessage()
process
public long process(java.io.PrintWriter out)
throws java.io.IOException,
java.lang.Exception
- Throws:
java.io.IOException
java.lang.Exception
clearModuleContent
public java.lang.String clearModuleContent(java.lang.String moduleName)
- This method can be used to clear a modules set content from the
page before it has been rendered. The content is returned so you
can do what you would like with the content but it will not show
up in the page unless placed there manually.
- Parameters:
moduleName
- is the name of the modules content to clear.
- Returns:
- is the content html string if content has been set for the
module, null otherwise.
getPositionForModule
public java.lang.String getPositionForModule(java.lang.String moduleName)
determineTheme
private java.lang.String determineTheme()
Copyright CSIR. All Rights Reserved.