|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.acsinet_solutions.cetia4.controller.rest.RestRequestHandlerBase
public abstract class RestRequestHandlerBase
Base convenience class for REST-based request handlers. This class is closely related to REST servlets, and works as a strategy-like helper class for that class. This base class provides useful methods for both render and action types.
| Field Summary |
|---|
| Fields inherited from interface com.acsinet_solutions.cetia4.controller.ControllerConstants |
|---|
_METHOD_PARAM, _PAGE_PARAM, _ROOT_PARAM, DEFAULT_VIEW, ERROR_URL, ERROR_VIEW, LOAD_CANCEL, LOAD_CURRENT, LOAD_DEFAULT, LOAD_ERROR, LOAD_PREVIOUS |
| Fields inherited from interface com.acsinet_solutions.cetia4.controller.AttributeKeys |
|---|
_BUNDLE_KEY, _CONFIGURATION_KEY, _DEFAULT_CONTROLLER_KEY, _FORM_ACTION_KEY, _FORM_ATTRIBUTE_KEY, _LOCALE_KEY, _MESSAGE_KEY, _NAVIGATION_FLOW_KEY, _PORTAL_PATH_KEY, _RENDER_PARAMETERS_KEY, _SERVICE_LOCATOR_KEY, _SESSION_KEY, _SYSTEM_EXCEPTION_KEY, _VALIDATION_EXCEPTION_KEY |
| Constructor Summary | |
|---|---|
protected |
RestRequestHandlerBase(AbstractRestServlet servlet)
Package constructor |
| Method Summary | |
|---|---|
protected java.lang.String |
format(RequestContext context,
java.lang.String stub)
Format an error message for typical request error messages. |
protected RestController |
getActionController(MultipartContext context)
Get the action controller that corresponds to the given context. |
protected Configuration |
getConfiguration()
Get the servlet configuration object |
protected com.acsinet_solutions.cetia4.controller.rest.ControllerManager |
getControllerManager()
Get the render controller suitable for the current request. |
protected org.apache.commons.logging.Log |
getLogger()
Get the logger for the current servlet. |
protected javax.servlet.ServletConfig |
getServletConfig()
Get the servlet config |
protected javax.servlet.ServletContext |
getServletContext()
Get the servlet context |
protected Link |
getSpecialRenderLink(WebServletRequestContext context,
java.lang.String view)
Get the render link for the special provided view. |
protected java.lang.String |
getViewPath(RestController controller,
java.lang.String view,
java.lang.String viewPath,
java.lang.String extension)
Get the path to a given view. |
protected void |
loadRenderView(WebServletRequestContext context,
java.lang.String view)
Redirect to te render view. |
protected java.lang.String |
performAction(RestController controller,
MultipartContext context)
Execute the action request. |
protected java.lang.String |
render(RenderContext context,
RestController controller)
A RenderController is executed in this method, and errors are handled. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.acsinet_solutions.cetia4.controller.ServletRequestHandler |
|---|
getRequestContext, getRestController, handleRequest, handles |
| Constructor Detail |
|---|
protected RestRequestHandlerBase(AbstractRestServlet servlet)
| Method Detail |
|---|
protected final java.lang.String format(RequestContext context,
java.lang.String stub)
Utility method, this may be moved to a more suitable class if necessary
protected final com.acsinet_solutions.cetia4.controller.rest.ControllerManager getControllerManager()
protected final org.apache.commons.logging.Log getLogger()
protected final javax.servlet.ServletContext getServletContext()
protected final javax.servlet.ServletConfig getServletConfig()
protected final Configuration getConfiguration()
protected final java.lang.String render(RenderContext context,
RestController controller)
throws javax.servlet.ServletException
javax.servlet.ServletExceptionRestController.execute(RequestContext)protected final RestController getActionController(MultipartContext context)
protected final java.lang.String performAction(RestController controller,
MultipartContext context)
RestController.execute(RequestContext)
protected final Link getSpecialRenderLink(WebServletRequestContext context,
java.lang.String view)
ControllerTools.getSpecialLink(NavigationFlow,String)
protected final void loadRenderView(WebServletRequestContext context,
java.lang.String view)
throws java.io.IOException
java.io.IOException - A redirection is performed here, and that may
cause an IO Exception to be thrown.ActionContext.setRenderParameter(String,Object)
protected final java.lang.String getViewPath(RestController controller,
java.lang.String view,
java.lang.String viewPath,
java.lang.String extension)
controller - used to obtain the resource path to the view files
in case of a relative viewview - the absolute or relative requested view. If absolute
( starts with / ), this string will be returned with no further
modificationviewPath - The default view path for the current type of request.
Default view path for web requests is /WEB-INF/html and for web
services requests is /WEB-INF/xmlextension - The default extension for the current type of request.
Default extension for web requests is .jsp, and for web service requests
is .jspx. If the view param has already a .jsp or .jspx extension, this
parameter will be ignored.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||