Class TrapAction
- java.lang.Object
-
- dk.netarkivet.harvester.webinterface.TrapAction
-
- Direct Known Subclasses:
TrapActivationAction
,TrapCreateOrUpdateAction
,TrapDeleteAction
,TrapReadAction
public abstract class TrapAction extends Object
Abstract class representing an action to take on the collection of global crawler traps.
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
log
-
Constructor Summary
Constructors Constructor Description TrapAction()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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.
-
-