dk.netarkivet.harvester.webinterface
Class TrapAction

java.lang.Object
  extended by dk.netarkivet.harvester.webinterface.TrapAction
Direct Known Subclasses:
TrapActivationAction, TrapCreateOrUpdateAction, TrapDeleteAction, TrapReadAction

public abstract class TrapAction
extends java.lang.Object

Abstract class representing an action to take on the collection of global crawler traps.


Constructor Summary
TrapAction()
           
 
Method Summary
protected abstract  void doAction(javax.servlet.jsp.PageContext context, I18n i18n)
          Method implementing the specific action to take
static void processRequest(javax.servlet.jsp.PageContext context, I18n i18n)
          This method processes the request to determine which action it corresponds to and passes the request along accordingly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrapAction

public TrapAction()
Method Detail

processRequest

public static void processRequest(javax.servlet.jsp.PageContext context,
                                  I18n i18n)
                           throws ForwardedToErrorPage
This method processes the request to determine which action it corresponds to and passes the request along accordingly. If it is a multipart post then it is passed along to a create-or-update instance. Otherwise if no action is specified, none is taken. Otherwise the request is passed on to a specific concrete instance of this class for further processing.

Parameters:
context - the original servlet context of the request.
i18n - the internationalisation to be used.
Throws:
ForwardedToErrorPage - if an exception is thrown while carrying out the action.

doAction

protected abstract void doAction(javax.servlet.jsp.PageContext context,
                                 I18n i18n)
Method implementing the specific action to take

Parameters:
context - the context of the servlet request triggering this action.
i18n - the internationalisation to use for presenting the results.