org.mycore.frontend.servlets
Class MCRCheckClassACLServlet

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

public class MCRCheckClassACLServlet
extends MCRServlet

The servlet store the MCREditorServlet output XML in a file of a MCR type dependencies directory, check it dependence of the MCR type and store the XML in a file in this directory or if an error was occured start the editor again with todo repair.

Version:
$Revision: 15202 $ $Date: 2009-05-15 17:00:44 +0200 (Fri, 15 May 2009) $
Author:
Jens Kupferschmidt, Thomas Scheffler (yagee)
See Also:
Serialized Form

Field Summary
protected static Logger LOGGER
           
protected static MCRUserMgr UM
           
 
Fields inherited from class org.mycore.frontend.servlets.MCRServlet
BASE_URL_ATTRIBUTE, trustedProxies
 
Constructor Summary
MCRCheckClassACLServlet()
           
 
Method Summary
 void doGetPost(MCRServletJob job)
          This method overrides doGetPost of MCRServlet and handels all actions against the ACL data.
protected  String getNextURL(MCRObjectID ID, boolean okay)
          The method return an URL with the next working step.
protected  Element prepareService(Document jdom_in, MCRObjectID ID, MCRServletJob job, String lang)
          The method read the incoming servacls JDOM tree in a MCRService and prepare this by the following rules.
 void sendMail(MCRObjectID ID)
          The method send a message to the mail address for the MCRObjectType.
 boolean storeService(Element outelm, MCRServletJob job, MCRObjectID ID)
          The method store the incoming service data from the ACL editor to the workflow.
 
Methods inherited from class org.mycore.frontend.servlets.MCRServlet
buildRedirectURL, doGet, doGet, doPost, doPost, generateActiveLinkErrorpage, generateErrorPage, getBaseURL, getLastModified, getLayoutService, getProperty, getRemoteAddr, getServletBaseURL, getSession, handleException, init, 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
 

Field Detail

LOGGER

protected static Logger LOGGER

UM

protected static MCRUserMgr UM
Constructor Detail

MCRCheckClassACLServlet

public MCRCheckClassACLServlet()
Method Detail

doGetPost

public void doGetPost(MCRServletJob job)
               throws Exception
This method overrides doGetPost of MCRServlet and handels all actions against the ACL data.

Overrides:
doGetPost in class MCRServlet
Parameters:
job - the MCRServlet job instance
Throws:
Exception

getNextURL

protected String getNextURL(MCRObjectID ID,
                            boolean okay)
                     throws MCRActiveLinkException
The method return an URL with the next working step. If okay flag is true, the object will present else it shows the error page.

Parameters:
ID - the MCRObjectID of the MCRObject
okay - the return value of the store operation
Returns:
the next URL as String
Throws:
MCRActiveLinkException

sendMail

public final void sendMail(MCRObjectID ID)
The method send a message to the mail address for the MCRObjectType.

Parameters:
ID - the MCRObjectID of the MCRObject

prepareService

protected Element prepareService(Document jdom_in,
                                 MCRObjectID ID,
                                 MCRServletJob job,
                                 String lang)
                          throws Exception
The method read the incoming servacls JDOM tree in a MCRService and prepare this by the following rules. After them it return a JDOM Element of servacls as clone of the prepared data.

Parameters:
jdom_in - the JDOM tree from the editor
ID - the MCRObjectID of the MCRObject
job - the MCRServletJob data
lang - the current language
Throws:
Exception

storeService

public final boolean storeService(Element outelm,
                                  MCRServletJob job,
                                  MCRObjectID ID)
The method store the incoming service data from the ACL editor to the workflow.

Parameters:
outelm - the service subelement of an MCRObject
job - the MCRServletJob instance
ID - the MCRObjectID