org.sandev.tools.UIEditor
Class XHTMLUIEditorServlet

java.lang.Object
  extended byjavax.servlet.GenericServlet
      extended byjavax.servlet.http.HttpServlet
          extended byorg.sandev.tools.UIEditor.XHTMLUIEditorServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class XHTMLUIEditorServlet
extends javax.servlet.http.HttpServlet

An XHTML servlet UI for editing a SandUI. See the SandUIStruct for details on what information comprises a SAND UI. AUTOGENERATED FILE, DO NOT EDIT DIRECTLY.
source: declared in build
generator: org.sandev.generator.UIEditorGenerator
time: Dec 2, 2005 6:38:59 PM

The SandUI instance being edited is read and saved to the file specified in the "SandUIFile" parameter.

See Also:
Serialized Form

Field Summary
static java.lang.String SANDUIFILE
          The name of the parameter specifying the file name for the saved UI information.
static java.lang.String SANDUIPROJ
          The name of the parameter specifying the source application project.
protected static XHTMLFormEditor singleton_editor
          Singleton XHTMLFormEditor reference.
 
Constructor Summary
XHTMLUIEditorServlet()
           
 
Method Summary
protected  void createFormEditor(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          This method initializes our XHTMLFormEditor instance.
 void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Pass HTTP 'GET' request over to handleRequest method.
 void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Pass HTTP 'POST' request over to handleRequest method.
protected  void failout(java.lang.String text, javax.servlet.http.HttpServletResponse res)
          Die with the appropriate message
protected  XHTMLFormEditor getXHTMLFormEditor(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Initializing accessor for the XHTMLFormEditor we use.
protected  void handleRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Use our XHTMLFormEditor to process the request.
 
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

SANDUIPROJ

public static final java.lang.String SANDUIPROJ
The name of the parameter specifying the source application project.

See Also:
Constant Field Values

SANDUIFILE

public static final java.lang.String SANDUIFILE
The name of the parameter specifying the file name for the saved UI information.

See Also:
Constant Field Values

singleton_editor

protected static XHTMLFormEditor singleton_editor
Singleton XHTMLFormEditor reference. There's no reason to have more than one XHTMLFormEditor instance kicking around, or to incur the setup overhead more than once. So we maintain a single reference for use.

Constructor Detail

XHTMLUIEditorServlet

public XHTMLUIEditorServlet()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest req,
                  javax.servlet.http.HttpServletResponse res)
Pass HTTP 'GET' request over to handleRequest method.


doPost

public void doPost(javax.servlet.http.HttpServletRequest req,
                   javax.servlet.http.HttpServletResponse res)
Pass HTTP 'POST' request over to handleRequest method.


handleRequest

protected void handleRequest(javax.servlet.http.HttpServletRequest req,
                             javax.servlet.http.HttpServletResponse res)
Use our XHTMLFormEditor to process the request.


failout

protected void failout(java.lang.String text,
                       javax.servlet.http.HttpServletResponse res)
Die with the appropriate message


getXHTMLFormEditor

protected XHTMLFormEditor getXHTMLFormEditor(javax.servlet.http.HttpServletRequest req,
                                             javax.servlet.http.HttpServletResponse res)
Initializing accessor for the XHTMLFormEditor we use. Once the instance is set up, we just return it without any synchronization overhead.


createFormEditor

protected void createFormEditor(javax.servlet.http.HttpServletRequest req,
                                javax.servlet.http.HttpServletResponse res)
This method initializes our XHTMLFormEditor instance. This method is synchronized so that two separate servlet instances won't both try to initialize the common reference at the same time. We test that our reference is null, so subsequent calls to this method after things are set up are harmless.