|
|||||||||
| 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.sandev.tools.FileEditor.XHTMLFileEditorServlet
public class XHTMLFileEditorServlet
An XHTML servlet UI for editing a SAND XML file such as a TestScript.
AUTOGENERATED FILE, DO NOT EDIT DIRECTLY.
source: declared in build
generator: org.sandev.generator.FileEditorGenerator
time: Jul 31, 2008 4:34:17 PM
| Field Summary | |
|---|---|
protected static java.lang.String |
doneLink
The link we write out for noting when we are done editing a specific instance. |
protected java.lang.String |
filename
The name of the file we are currently working with. |
static java.lang.String |
FILENAMEPARAM
The name of the parameter specifying the name of the file or directory we are currently editing. |
protected static XHTMLFormEditor |
singleton_editor
Singleton XHTMLFormEditor reference. |
static java.lang.String |
TITLE
The title of the editing application |
| Constructor Summary | |
|---|---|
XHTMLFileEditorServlet()
|
|
| Method Summary | |
|---|---|
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Pass HTTP 'GET' request over to handleRequest method. |
protected boolean |
doneEditing(javax.servlet.http.HttpServletRequest req)
Return true if we are done editing the instance we were working with, false otherwise. |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Pass HTTP 'POST' request over to handleRequest method. |
protected void |
dumpDescription(java.io.PrintWriter out,
java.lang.String dirname,
java.lang.String filename)
Read the specified XML file to grab the comment or description field out of it. |
protected void |
dumpDirLink(java.io.PrintWriter out,
java.lang.String dirname,
java.lang.String text)
Write out a link to the specified directory. |
protected void |
dumpFileLink(java.io.PrintWriter out,
java.lang.String dirname,
java.lang.String filename)
Write out a link to the specified directory. |
protected void |
dumpNewFileForm(java.io.PrintWriter out)
Dump out a form allowing the user to enter a new filename and submit it back as a URL param. |
protected void |
failout(java.lang.String text,
javax.servlet.http.HttpServletResponse res)
Die with the appropriate message |
java.lang.String |
getFilename()
accessor for filename |
protected java.lang.String |
getFileShortname(java.lang.String filename)
Given a filename, return the unqualified part of it. |
protected java.lang.String |
getURLParam(javax.servlet.http.HttpServletRequest req,
java.lang.String key)
Get the filename specification from the URL and return it. |
protected void |
handleRequest(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Process the file specified in the URL, or pass the request on to our XHTMLFormEditor if we are already editing. |
protected void |
initXHTMLFormEditor(java.lang.String filename,
java.lang.String msgClass)
|
protected void |
listDirectorySelections(java.io.File dir,
javax.servlet.http.HttpServletResponse res)
List the files in the given directory as links for editing, and an option to create a new file. |
protected void |
plog(java.lang.String text)
Wrapper for general servlet log so we can shut it off or on in one place. |
void |
setFilename(java.lang.String val)
mutator for filename |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String FILENAMEPARAM
public static final java.lang.String TITLE
protected java.lang.String filename
protected static final java.lang.String doneLink
protected static XHTMLFormEditor singleton_editor
| Constructor Detail |
|---|
public XHTMLFileEditorServlet()
| Method Detail |
|---|
public java.lang.String getFilename()
public void setFilename(java.lang.String val)
public void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
doGet in class javax.servlet.http.HttpServlet
public void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
doPost in class javax.servlet.http.HttpServlet
protected void handleRequest(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
protected java.lang.String getURLParam(javax.servlet.http.HttpServletRequest req,
java.lang.String key)
protected boolean doneEditing(javax.servlet.http.HttpServletRequest req)
protected void listDirectorySelections(java.io.File dir,
javax.servlet.http.HttpServletResponse res)
protected void dumpDirLink(java.io.PrintWriter out,
java.lang.String dirname,
java.lang.String text)
protected void dumpFileLink(java.io.PrintWriter out,
java.lang.String dirname,
java.lang.String filename)
protected void dumpDescription(java.io.PrintWriter out,
java.lang.String dirname,
java.lang.String filename)
protected java.lang.String getFileShortname(java.lang.String filename)
protected void dumpNewFileForm(java.io.PrintWriter out)
protected void failout(java.lang.String text,
javax.servlet.http.HttpServletResponse res)
protected void plog(java.lang.String text)
protected void initXHTMLFormEditor(java.lang.String filename,
java.lang.String msgClass)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||