org.mycore.frontend.editor
Class MCREditorServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.mycore.frontend.servlets.MCRServlet
              extended by org.mycore.frontend.editor.MCREditorServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig, MCRSessionListener

public class MCREditorServlet
extends MCRServlet
implements MCRSessionListener

This servlet handles form submissions from MyCoRe XML Editor pages and converts the submitted data into a JDOM XML document for further processing. It can also handle file uploads.

Version:
$Revision: 14910 $ $Date: 2009-03-16 20:20:01 +0100 (Mon, 16 Mar 2009) $
Author:
Frank L�tzenkirchen
See Also:
Serialized Form

Field Summary
protected static Logger logger
           
 
Fields inherited from class org.mycore.frontend.servlets.MCRServlet
BASE_URL_ATTRIBUTE, trustedProxies
 
Constructor Summary
MCREditorServlet()
           
 
Method Summary
 void destroy()
           
 void doGetPost(MCRServletJob job)
          This method should be overwritten by other servlets.
(package private) static MCRCache getEditorSessionCache()
          For each user session, the state of all editor forms most recently used is kept in a cache.
 void init()
           
static void replaceEditorElements(HttpServletRequest request, String uri, Document xml)
          Replaces editor elements in static webpage with complete editor definition.
 void sessionEvent(MCRSessionEvent event)
           
 
Methods inherited from class org.mycore.frontend.servlets.MCRServlet
buildRedirectURL, doGet, doGet, doPost, doPost, generateActiveLinkErrorpage, generateErrorPage, getBaseURL, getLastModified, getLayoutService, getProperty, getRemoteAddr, getServletBaseURL, getSession, handleException, initTrustedProxies, render, reportException, think
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, 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
 

Field Detail

logger

protected static final Logger logger
Constructor Detail

MCREditorServlet

public MCREditorServlet()
Method Detail

init

public void init()
          throws ServletException
Overrides:
init in class MCRServlet
Throws:
ServletException

destroy

public void destroy()
Specified by:
destroy in interface Servlet
Overrides:
destroy in class GenericServlet

getEditorSessionCache

static MCRCache getEditorSessionCache()
For each user session, the state of all editor forms most recently used is kept in a cache. The number of editor form data that is kept is controlled by the property MCR.EditorFramework.MaxEditorsInSession.


sessionEvent

public void sessionEvent(MCRSessionEvent event)
Specified by:
sessionEvent in interface MCRSessionListener

doGetPost

public void doGetPost(MCRServletJob job)
               throws ServletException,
                      IOException
Description copied from class: MCRServlet
This method should be overwritten by other servlets. As a default response we indicate the HTTP 1.1 status code 501 (Not Implemented).

Overrides:
doGetPost in class MCRServlet
Throws:
ServletException
IOException

replaceEditorElements

public static void replaceEditorElements(HttpServletRequest request,
                                         String uri,
                                         Document xml)
Replaces editor elements in static webpage with complete editor definition.

Parameters:
request - the current MCRServletJob
uri - the uri of the static XML file containing the editor
xml - the complete XML document of the static webpage