|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openejb.webadmin.WebAdminBean
public abstract class WebAdminBean
This is the template web admin bean to extend from. It contains all the functionality for the webadministration. To use
this class, simply sub-class it:
public class MyBean extends WebAdminBean {
...
}
and declare the following methods:
public void ejbCreate() {}
public void preProcess(HttpRequest request, HttpResponse response) throws IOException {}
public void postProcess(HttpRequest request, HttpResponse response) throws IOException {}
public void writeBody(PrintWriter body) throws IOException {}
public void writeHtmlTitle(PrintWriter body) throws IOException {}
public void writePageTitle(PrintWriter body) throws IOException {}
public void writeSubMenuItems(PrintWriter body) throws IOException {}
| Field Summary | |
|---|---|
protected javax.ejb.SessionContext |
ejbContext
used for the session context |
protected static java.lang.String |
footer
the footer |
static java.lang.String |
HTML_TITLE
the standard title |
protected HttpRequest |
request
the HTTP request |
protected HttpResponse |
response
the HTTP response |
protected java.lang.String |
section
the menu section |
static java.util.HashMap |
sections
the navigation sections |
static int |
SUBSTITUTE
the substitue |
| Constructor Summary | |
|---|---|
WebAdminBean()
|
|
| Method Summary | |
|---|---|
void |
ejbActivate()
called on a stateful sessionbean after the bean is deserialized from storage and put back into use. |
void |
ejbCreate()
called with the bean is created |
void |
ejbPassivate()
called on a stateful sessionbean before the bean is removed from memory and serialized to a temporary store. |
void |
ejbRemove()
called when the bean is about to be garbage collected |
java.lang.String |
formatSubMenuItem(java.lang.String itemName,
java.lang.String url)
formats a sub menu item for the left navigation |
static java.lang.String |
getFooter()
gets a footer for the document |
java.io.InputStream |
getTemplate()
gets an html template which is the content of the pages written to the browser |
java.util.HashMap |
initNavSections()
initalizes the left and top menu navigation |
void |
onMessage(HttpRequest request,
HttpResponse response)
the main method of this bean, it takes care of the processing |
abstract void |
postProcess(HttpRequest request,
HttpResponse response)
called after all content is written to the browser |
abstract void |
preProcess(HttpRequest request,
HttpResponse response)
called before any content is written to the browser |
protected void |
printRow(java.lang.String col1,
java.lang.String col2,
java.io.PrintWriter out)
prints a table row similar to this <tr> <td>some info</td> <td>some more info</td> </tr> |
protected void |
printRow(java.lang.String col1,
java.lang.String col2,
java.lang.String col3,
java.io.PrintWriter out)
prints a table row similar to this <tr> <td>some info</td> <td>some more info</td> <td>yet some more info</td> </tr> |
void |
setSessionContext(javax.ejb.SessionContext sessionContext)
sets the session context |
abstract void |
writeBody(java.io.PrintWriter body)
writes the main body content to the broswer. |
void |
writeFooter(java.io.PrintWriter body)
Write the footer |
abstract void |
writeHtmlTitle(java.io.PrintWriter body)
Write the TITLE of the HTML document. |
void |
writeLeftNavBar(java.io.PrintWriter body)
Write the left navigation bar of the page. |
abstract void |
writePageTitle(java.io.PrintWriter body)
Write the title of the page. |
void |
writeTemplate(java.io.PrintWriter out,
java.io.InputStream template)
writes a template from the input stream to the output stream |
void |
writeTopNavBar(java.io.PrintWriter body)
Write the top navigation bar of the page. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected javax.ejb.SessionContext ejbContext
public static final int SUBSTITUTE
public static java.util.HashMap sections
protected java.lang.String section
protected HttpRequest request
protected HttpResponse response
public static final java.lang.String HTML_TITLE
protected static java.lang.String footer
| Constructor Detail |
|---|
public WebAdminBean()
| Method Detail |
|---|
public void onMessage(HttpRequest request,
HttpResponse response)
throws java.io.IOException
onMessage in interface HttpBeanrequest - the http requestresponse - the http response
java.io.IOException - if an exception is thrown
public abstract void preProcess(HttpRequest request,
HttpResponse response)
throws java.io.IOException
request - the http requestresponse - the http response
java.io.IOException - if an exception is thrown
public abstract void postProcess(HttpRequest request,
HttpResponse response)
throws java.io.IOException
request - the http requestresponse - the http response
java.io.IOException - if an exception is thrown
public abstract void writeHtmlTitle(java.io.PrintWriter body)
throws java.io.IOException
<head><title>
</title></head> tags
body - the output to write to
java.io.IOException - of an exception is thrown
public abstract void writePageTitle(java.io.PrintWriter body)
throws java.io.IOException
body - the output to write to
java.io.IOException - if an exception is thrown
public void writeTopNavBar(java.io.PrintWriter body)
throws java.io.IOException
<a href="system?show=server">
<span class="menuTopOff">Remote Server</span>
</a>
<a href="system?show=containers">
<span class="menuTopOff">Containers</span>
</a>
<a href="system?show=deployments">
<span class="menuTopOff">Deployments</span>
</a>
<a href="system?show=logs">
<span class="menuTopOff">Logs</span>
</a>
body - the output to write to
java.io.IOException - if an exception is thrown
public void writeLeftNavBar(java.io.PrintWriter body)
throws java.io.IOException
<tr>
<td valign="top" align="left">
<span class="subMenuOn">
Admin
</span>
</td>
</tr>
<tr>
<td valign="top" align="left">
<a href="system?show=status"><span class="subMenuOff">
Status
</span>
</a></td>
</tr>
<tr>
<<td valign="top" align="left">
<a href="system?show=deployments"><span class="subMenuOff">
Deployments
</span>
</a></td>
</tr>
body - the output to write to
java.io.IOException - if an exception is thrown
public java.lang.String formatSubMenuItem(java.lang.String itemName,
java.lang.String url)
itemName - the name for displayurl - the url to link
public abstract void writeBody(java.io.PrintWriter body)
throws java.io.IOException
<p> block
body - the output to write to
java.io.IOException - if an exception is thrown
public void writeFooter(java.io.PrintWriter body)
throws java.io.IOException
body - the output to write to
java.io.IOException - if an exception is thrownpublic static java.lang.String getFooter()
public void writeTemplate(java.io.PrintWriter out,
java.io.InputStream template)
throws java.io.IOException
out - the output to write totemplate - the template to read
java.io.IOException - if an exception is thrown
public java.io.InputStream getTemplate()
throws java.io.IOException
java.io.IOException - if an exception is thrownpublic java.util.HashMap initNavSections()
protected void printRow(java.lang.String col1,
java.lang.String col2,
java.io.PrintWriter out)
throws java.io.IOException
col1 - the first columncol2 - the second columnout - the output to write to
java.io.IOException - if an exception is thrown
protected void printRow(java.lang.String col1,
java.lang.String col2,
java.lang.String col3,
java.io.PrintWriter out)
throws java.io.IOException
col1 - the first columncol2 - the second columncol3 - the third columnout - the output to write to
java.io.IOException - if an exception is thrown
public void ejbCreate()
throws javax.ejb.CreateException
javax.ejb.CreateException - if the bean cannot be createdpublic void ejbActivate()
ejbActivate in interface javax.ejb.SessionBeanpublic void ejbPassivate()
ejbPassivate in interface javax.ejb.SessionBeanpublic void ejbRemove()
ejbRemove in interface javax.ejb.SessionBeanpublic void setSessionContext(javax.ejb.SessionContext sessionContext)
setSessionContext in interface javax.ejb.SessionBeansessionContext - the session context
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||