|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.acsinet_solutions.cetia4.controller.rest.AbstractRestServlet
public abstract class AbstractRestServlet
Basic class that implements common functionality for both REST servlets that implement a module themselves, and those that delegate implementation to external modules.
A REST-based servlet; implements basic REST support in a basic servlet. Get and Post requests are forwarded to different methods.
The servlet name configured in web.xml for subclasses of this servlet is important, as it will be used for naming the module.
The servlet mapping is also important, and it must correspond to the servlet name. For example, if the servlet name is "notas", the servlet mapping must be "/notas/*" so the internal navigation and REST facilities will work well.
| 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 | |
|---|---|
AbstractRestServlet()
Public constructor that registers the default handlers |
|
| Method Summary | |
|---|---|
protected void |
doDelete(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
protected void |
doPut(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
Configuration |
getConfiguration()
Get the configuration instance that encapsulates configuration for the current servlet. |
ServiceLocator |
getLocator()
Convenience method to get a reference to the configured service locator - if any. |
org.apache.commons.logging.Log |
getLogger()
Get the logger for subclasses and helper classes |
protected abstract RestModule |
getRestModule()
This is a factory abstract template method that will be overriden by subclasses to provide the Root Rest module that will be attended by the current instance. |
UserSessionManager |
getUserSessionManager()
Get the session manager used to create the UserSession structures with the information of the current logged-in user. |
void |
init()
|
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doHead, doOptions, doTrace, getLastModified, 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 |
| Constructor Detail |
|---|
public AbstractRestServlet()
| Method Detail |
|---|
public final org.apache.commons.logging.Log getLogger()
public ServiceLocator getLocator()
public Configuration getConfiguration()
public UserSessionManager getUserSessionManager()
protected abstract RestModule getRestModule()
public void init()
throws javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletException
protected final void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOException
protected final void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOException
protected final void doPut(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doPut in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOException
protected final void doDelete(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doDelete in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||