org.mycore.frontend.servlets
Class MCRWebCLIServlet

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.servlets.MCRWebCLIServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class MCRWebCLIServlet
extends MCRServlet

Handles request from AJAX GUI.

Since:
2.0
Author:
Thomas Scheffler (yagee)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.mycore.frontend.servlets.MCRServlet
BASE_URL_ATTRIBUTE, trustedProxies
 
Constructor Summary
MCRWebCLIServlet()
           
 
Method Summary
protected  void doGetPost(MCRServletJob job)
          Provides the access for the ajax gui.
protected static List<MCRCommand> getCommands()
           
 void init()
           
 
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
destroy, 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

MCRWebCLIServlet

public MCRWebCLIServlet()
Method Detail

init

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

doGetPost

protected void doGetPost(MCRServletJob job)
                  throws Exception
Provides the access for the ajax gui. Two parameters are recognized: request and run

While run will not return anything else but a HTTP return code, it is used to submit a new command to the current MCRSession command queue (see addCommand method).

On the other hand: request can be used to receive some information from the command execution.

The content type of the OK response is application/x-json.

Overrides:
doGetPost in class MCRServlet
Throws:
Exception

getCommands

protected static List<MCRCommand> getCommands()