Package net.anotheria.anosite.handler
Class AbstractBoxHandler
- java.lang.Object
-
- net.anotheria.anosite.handler.AbstractBoxHandler
-
- All Implemented Interfaces:
BoxHandler
- Direct Known Subclasses:
AbstractValidationBoxHandler,DefaultStepCommandsHandler,ImageBrowserHandler,NoneHandler,RedirectImmediatelyHandler
public abstract class AbstractBoxHandler extends Object implements BoxHandler
Adapter style implementation of a boxhandler.- Author:
- another
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractBoxHandler()Constructor for extending classes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.slf4j.LoggergetLog()Returns the log instance.protected static IASResourceDataServicegetResourceDataService()protected static StringgetTextResource(String name)Returns a text resource by its name.BoxHandlerResponseprocess(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, Box box, BoxBean bean)Returns ResponseContinue.INSTANCE.protected voidsendAttributeToPage(String name, Object attribute)Used to put attribute to current request till next requestBoxHandlerResponsesubmit(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, Box box)Returns ResponseContinue.INSTANCE.
-
-
-
Method Detail
-
getLog
protected org.slf4j.Logger getLog()
Returns the log instance. This way each handler has a useable log.- Returns:
- Logger.
-
process
public BoxHandlerResponse process(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, Box box, BoxBean bean) throws BoxProcessException
Returns ResponseContinue.INSTANCE.- Specified by:
processin interfaceBoxHandler- Parameters:
req- the http servlet requestres- the http servlet responsebox- the box this handler has been associated with (and which was currently processed).bean- the already created bean.- Returns:
- response
- Throws:
BoxProcessException
-
submit
public BoxHandlerResponse submit(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res, Box box) throws BoxSubmitException
Returns ResponseContinue.INSTANCE.- Specified by:
submitin interfaceBoxHandler- Parameters:
req- requestres- responsebox- box itself- Returns:
- response
- Throws:
BoxSubmitException
-
getResourceDataService
protected static IASResourceDataService getResourceDataService()
-
sendAttributeToPage
protected void sendAttributeToPage(String name, Object attribute)
Used to put attribute to current request till next request- Parameters:
name- attribute nameattribute- attribute value
-
-