|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.lutris.appserver.server.jolt.joltpo.JoltPage
Base class of a Jolt-HTML page. Each page extends this class. It is also passed to each of the page component objects as an argument.
Field Summary | |
Application |
application
Application object that this presentation is associated with. |
JoltCallArgs |
callArgs
On Jolt calls, contains the arguments specified in the <JOLT CALL> tag. |
JoltPageData |
data
Table used to set Jolt fields, contains CGI args, etc. |
java.lang.Throwable |
exception
If an exception/error occured, this field is set to the exception object. |
protected static int |
HTML_ENCODING
Use HTML encoding. |
protected static int |
JAVASCRIPT_ENCODING
Use JavaScript encoding. |
protected static int |
NO_ENCODING
Use no encoding. |
protected HttpPresentationComms |
presentationComms
|
protected java.util.Hashtable |
queryTable
CGI arguments, stored as a hash table. |
JoltRequest |
request
Request object that contains the data from the HTTP request. |
JoltResponse |
response
Response object used to set cookies and other headers. |
Session |
session
Session object that this presentation is associated with. |
java.lang.String |
tagContents
On Jolt calls, contains the body of the tag between <JOLT CALL> and </JOLT>. |
Constructor Summary | |
JoltPage()
|
Method Summary | |
void |
append(java.lang.String html)
Append HTML to the current page. |
void |
append(java.lang.StringBuffer html)
Append HTML to the current page. |
protected void |
appendFieldValue(java.lang.String field,
int encoding,
java.lang.String defaultValue)
Function to append a field from keyword/value table. |
void |
appendln(java.lang.String html)
Append HTML to the current page with carrage return. |
void |
appendln(java.lang.StringBuffer html)
Append HTML to the current page with carrage return. |
void |
clear()
Clears the internal buffer of HTML appended since the last flush() or since the beginning of the page. |
protected boolean |
fieldCompare(java.lang.String keyword,
java.lang.String str)
Determine if a specified field's value compares to a string. |
protected boolean |
fieldExists(java.lang.String keyword)
Determine if a specified field is defined. |
void |
flush()
Write all currently buffered HTML to the client. |
protected void |
parseCgiArgs()
Parse CGI arguments into a keyword/value table and save in the page data object. |
void |
run(HttpPresentationComms comms)
Abstract methods that run all code on the page and output the results to the HTTP client. |
protected abstract void |
runPage()
Methods defined by the derived class that executes the contents of the page. |
protected void |
sourceFile(java.lang.String appFileName)
Sources a file found by the class loader, appending it to the output buffer. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static final int HTML_ENCODING
protected static final int JAVASCRIPT_ENCODING
protected static final int NO_ENCODING
public JoltRequest request
public JoltResponse response
public JoltPageData data
public JoltCallArgs callArgs
public java.lang.String tagContents
public Application application
public Session session
public java.lang.Throwable exception
protected java.util.Hashtable queryTable
protected HttpPresentationComms presentationComms
Constructor Detail |
public JoltPage()
Method Detail |
public void append(java.lang.String html)
html
- string to append.public void append(java.lang.StringBuffer html)
html
- string buffer to append.public void appendln(java.lang.String html)
html
- string to append.public void appendln(java.lang.StringBuffer html)
html
- string buffer to append.protected boolean fieldExists(java.lang.String keyword) throws HttpPresentationException
keyword
- Key of the object in the page data table to check.true
,
if not false
.protected boolean fieldCompare(java.lang.String keyword, java.lang.String str) throws HttpPresentationException
keyword
- Key of the object in the page data table.str
- String to comparestr
true
is returned, if they are not
equal or false
if the strings are not equal or the
field does not exist.public void clear()
flush()
or since the beginning of the page. Note
that it does not effect HTTP headers. It can be used effectively
to replace the dynamically generated page with an HTML error.public void flush() throws HttpPresentationException
run
method completes. This is provide mainly to allow a stream of
JavaScript to be written to the client while some long-running task
is waiting to complete. The first time this function is called, any
response cookies or headers that have been set are sent to the client.
Attempts to set response cookies or headers after this function has
been called will result in an error.protected void appendFieldValue(java.lang.String field, int encoding, java.lang.String defaultValue) throws java.lang.Exception
field
- Name of field to append.encoding
- Type of encoding to use. One of
HTML_ENCODING
, JAVASCRIPT_ENCODING
, or
NO_ENCODING
.defaultValue
- The default value to use, or null if
no default.- Throws:
- java.lang.Exception - JoltHTML page objects may throw any exception.
protected void sourceFile(java.lang.String appFileName) throws java.io.IOException, HttpPresentationException
appFileName
- The file to source. It may either be relative to the
path of this presentation object, or absolute, which makes it relative
to the application's presentationPrefix
.protected void parseCgiArgs() throws java.lang.Exception
queryTable
- Hashtable contain CGI arguments and values.protected abstract void runPage() throws java.lang.Exception
public void run(HttpPresentationComms comms) throws java.lang.Exception
comms
- HTTP communications object.
|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |