|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.melati.servlet.ConfigServlet
org.melati.servlet.PoemServlet
org.melati.servlet.TemplateServlet
org.melati.admin.Admin
public class Admin
Melati template servlet for database administration.
This class defines doTemplateRequest(Melati, ServletTemplateContext)
and methods it calls to interpret requests, depending on the current table
and object, if any.
Java methods with names ending "Template" and taking a
ServletTemplateContext and Melati as arguments are generally
called by doTemplateRequest(Melati, ServletTemplateContext)) to
implement corresponding request methods.
modifyTemplate(ServletTemplateContext, Melati) and associated
methods are slight variations.
#adminTemplate(ServletTemplateContext, String) is called in all cases
to return the template path. The name of the template is usually the same as
the request method but not if the same template is used for more than one
method or the template served depends on how request processing proceeds.
These methods are called to modify the context:
popupSelect(ServletTemplateContext, Melati)#primarySelect(ServletTemplateContext, Melati)selection(ServletTemplateContext, Melati)
| Field Summary |
|---|
| Fields inherited from class org.melati.servlet.TemplateServlet |
|---|
templateEngine |
| Fields inherited from class org.melati.servlet.ConfigServlet |
|---|
melatiConfig, sysAdminEmail, sysAdminName |
| Constructor Summary | |
|---|---|
Admin()
|
|
| Method Summary | |
|---|---|
protected static java.lang.String |
addTemplate(ServletTemplateContext context,
Melati melati)
Returns the Add template after placing the table and fields for the new row in the context using any field values already in the context. |
protected static java.lang.String |
addUpdateTemplate(ServletTemplateContext context,
Melati melati)
Returns the Updated template after creating a new row using field data in the context. |
protected static java.lang.String |
adminTemplate(java.lang.String name)
Return the resource path for an admin template. |
protected static org.melati.poem.Persistent |
create(org.melati.poem.Table table,
ServletTemplateContext context)
Creates a row for a table using field data in a template context. |
protected static java.lang.String |
deleteTemplate(ServletTemplateContext context,
Melati melati)
|
protected java.lang.String |
doTemplateRequest(Melati melati,
ServletTemplateContext context)
Override this method to build up your own output. |
protected static java.lang.String |
dsdTemplate(ServletTemplateContext context)
|
protected static java.lang.String |
duplicateTemplate(ServletTemplateContext context,
Melati melati)
|
protected static java.lang.String |
modifyTemplate(ServletTemplateContext context,
Melati melati)
Implements request method "Update". |
protected static ServletTemplateContext |
popupSelect(ServletTemplateContext context,
Melati melati)
|
protected static java.lang.String |
popupSelectTemplate(ServletTemplateContext context,
Melati melati)
Implements the field search/selection request method. |
protected static java.lang.String |
primarySelectTemplate(ServletTemplateContext context,
Melati melati)
|
protected static ServletTemplateContext |
selection(ServletTemplateContext context,
Melati melati)
Modifies the context in preparation for serving a template to view a selection of rows. |
protected static java.lang.String |
selectionRightTemplate(ServletTemplateContext context,
Melati melati)
Implements request to display a selection of records from a table in the right hand pane. |
protected static java.lang.String |
selectionTemplate(ServletTemplateContext context,
Melati melati)
Return template for a selection of records from a table. |
protected static java.lang.String |
selectionWindowPrimarySelectTemplate(ServletTemplateContext context,
Melati melati)
|
protected static java.lang.String |
selectionWindowSelectionTemplate(ServletTemplateContext context,
Melati melati)
|
protected static java.lang.String |
setupTemplate(ServletTemplateContext context,
Melati melati)
|
protected static java.lang.String |
updateTemplate(ServletTemplateContext context,
Melati melati)
Returns the Updated template after modifying the current row according to field values in the context. |
protected static java.lang.String |
uploadDoneTemplate(ServletTemplateContext context)
Finished uploading. |
protected static java.lang.String |
uploadTemplate(ServletTemplateContext context)
|
| Methods inherited from class org.melati.servlet.TemplateServlet |
|---|
addExtension, doPoemRequest, error, init, prePoemSession |
| Methods inherited from class org.melati.servlet.PoemServlet |
|---|
_handleException, dbBusyMessage, destroy, doConfiguredRequest, getSysAdminEmail, getSysAdminName, handleException, poemContext, poemContextWithLDB |
| Methods inherited from class org.melati.servlet.ConfigServlet |
|---|
doGet, doPost, melatiConfig, setSysAdminEmail, setSysAdminName, writeConnectionPendingException, writeError |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Admin()
| Method Detail |
|---|
protected static org.melati.poem.Persistent create(org.melati.poem.Table table,
ServletTemplateContext context)
protected static final java.lang.String adminTemplate(java.lang.String name)
protected static java.lang.String dsdTemplate(ServletTemplateContext context)
protected static java.lang.String primarySelectTemplate(ServletTemplateContext context,
Melati melati)
throws org.melati.poem.PoemException
org.melati.poem.PoemException
protected static java.lang.String selectionTemplate(ServletTemplateContext context,
Melati melati)
protected static java.lang.String selectionRightTemplate(ServletTemplateContext context,
Melati melati)
protected static ServletTemplateContext selection(ServletTemplateContext context,
Melati melati)
Any form fields in the context with names starting "field_" are assumed to hold values that must be matched in selected rows (if not null).
An encoding of the resulting whereClause is added to the context. "AND" is replaced by an & separator.
The resulting orderClause is added to the context.
A form field with name "start" is assumed to hold the number of the start row in the result set. The default is zero. The next 20 rows are selected and added as to the context as "results".
#adminTemplate(ServletTemplateContext, String)
protected static java.lang.String popupSelectTemplate(ServletTemplateContext context,
Melati melati)
throws org.melati.poem.PoemException
org.melati.poem.PoemException
protected static ServletTemplateContext popupSelect(ServletTemplateContext context,
Melati melati)
throws org.melati.poem.PoemException
org.melati.poem.PoemException
protected static java.lang.String selectionWindowPrimarySelectTemplate(ServletTemplateContext context,
Melati melati)
throws org.melati.poem.PoemException
org.melati.poem.PoemException
protected static java.lang.String selectionWindowSelectionTemplate(ServletTemplateContext context,
Melati melati)
protected static java.lang.String addTemplate(ServletTemplateContext context,
Melati melati)
throws org.melati.poem.PoemException
org.melati.poem.PoemException
protected static java.lang.String addUpdateTemplate(ServletTemplateContext context,
Melati melati)
throws org.melati.poem.PoemException
If successful the template will say so while reloading according to the returnTarget and returnURL values from the Form in context.
org.melati.poem.PoemException
protected static java.lang.String updateTemplate(ServletTemplateContext context,
Melati melati)
throws org.melati.poem.PoemException
If successful the template will say so while reloading according to the returnTarget and returnURL values from the Form in context.
org.melati.poem.PoemException
protected static java.lang.String deleteTemplate(ServletTemplateContext context,
Melati melati)
throws org.melati.poem.PoemException
org.melati.poem.PoemException
protected static java.lang.String duplicateTemplate(ServletTemplateContext context,
Melati melati)
throws org.melati.poem.PoemException
org.melati.poem.PoemException
protected static java.lang.String modifyTemplate(ServletTemplateContext context,
Melati melati)
throws FormParameterException
Calls another method depending on the requested action.
FormParameterExceptionupdateTemplate(ServletTemplateContext, Melati),
deleteTemplate(ServletTemplateContext, Melati),
duplicateTemplate(ServletTemplateContext, Melati)
protected static java.lang.String uploadTemplate(ServletTemplateContext context)
throws org.melati.poem.PoemException
org.melati.poem.PoemException
protected static java.lang.String uploadDoneTemplate(ServletTemplateContext context)
throws org.melati.poem.PoemException
context - the ServletTemplateContext in use
org.melati.poem.PoemException
protected static java.lang.String setupTemplate(ServletTemplateContext context,
Melati melati)
protected java.lang.String doTemplateRequest(Melati melati,
ServletTemplateContext context)
throws java.lang.Exception
TemplateServlet
doTemplateRequest in class TemplateServletmelati - the current Melaticontext - the current ServletTemplateContext
java.lang.Exception
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||