Class WebComponentRequestRouter<T extends WebComponentController<R>,R extends WebComponentRequestContext<? extends WebComponentController<R>>>
- java.lang.Object
-
- javax.servlet.GenericServlet
-
- javax.servlet.http.HttpServlet
-
- org.silverpeas.core.web.mvc.webcomponent.SilverpeasHttpServlet
-
- org.silverpeas.core.web.mvc.webcomponent.SilverpeasAuthenticatedHttpServlet
-
- org.silverpeas.core.web.mvc.route.ComponentRequestRouter<T>
-
- org.silverpeas.core.web.mvc.webcomponent.WebComponentRequestRouter<T,R>
-
- Type Parameters:
T
- the type of the Component Session Controller that provides a lot of stuff around the component, the user, etc.R
- the type of the web component context.
- All Implemented Interfaces:
Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
public final class WebComponentRequestRouter<T extends WebComponentController<R>,R extends WebComponentRequestContext<? extends WebComponentController<R>>> extends ComponentRequestRouter<T>
This request router is an extension of the historical one. It provides a new way to perform the requests on the server, especially by annoting methods that must be invoked.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.silverpeas.core.web.mvc.webcomponent.SilverpeasHttpServlet
SilverpeasHttpServlet.HttpError, SilverpeasHttpServlet.UserSessionStatus
-
-
Constructor Summary
Constructors Constructor Description WebComponentRequestRouter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
createComponentSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
protected void
doDelete(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
void
doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
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)
String
getDestination(String path, T componentSC, HttpRequest request)
This method has to be implemented by the component request Router it has to compute a destination pageString
getSessionControlBeanName()
This method has to be implemented in the component request Router class. returns the session control bean name to be put in the request object ex : for almanach, returns "almanach"void
init()
-
Methods inherited from class org.silverpeas.core.web.mvc.route.ComponentRequestRouter
checkUserAuthorization, emptyJsonResponse, getComponentId, getOrganizationController, hasTheSessionSecurityTokenToBeRenewed, sendJson, updateSessionManagement
-
Methods inherited from class org.silverpeas.core.web.mvc.webcomponent.SilverpeasAuthenticatedHttpServlet
getMainSessionController, getSessionInfo, getSynchronizerTokenService, renewSessionSecurityToken, service, throwUserSessionExpiration
-
Methods inherited from class org.silverpeas.core.web.mvc.webcomponent.SilverpeasHttpServlet
existOpenedUserSession, forbidden, notFound, preconditionFailed, redirectOrForwardService, sendError, sendError, throwHttpForbiddenError, throwHttpForbiddenError, throwHttpNotFoundError, throwHttpNotFoundError, throwHttpPreconditionFailedError, throwHttpPreconditionFailedError
-
Methods inherited from class javax.servlet.http.HttpServlet
doHead, doOptions, doTrace, getLastModified, service
-
-
-
-
Method Detail
-
init
public void init() throws javax.servlet.ServletException
- Overrides:
init
in classjavax.servlet.GenericServlet
- Throws:
javax.servlet.ServletException
-
getSessionControlBeanName
public String getSessionControlBeanName()
Description copied from class:ComponentRequestRouter
This method has to be implemented in the component request Router class. returns the session control bean name to be put in the request object ex : for almanach, returns "almanach"- Specified by:
getSessionControlBeanName
in classComponentRequestRouter<T extends WebComponentController<R>>
- Returns:
- the name of the session controller.
-
createComponentSessionController
public T createComponentSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
- Specified by:
createComponentSessionController
in classComponentRequestRouter<T extends WebComponentController<R>>
-
doPut
protected void doPut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
- Overrides:
doPut
in classjavax.servlet.http.HttpServlet
-
doDelete
protected void doDelete(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
- Overrides:
doDelete
in classjavax.servlet.http.HttpServlet
-
doPost
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
- Overrides:
doPost
in classComponentRequestRouter<T extends WebComponentController<R>>
-
doGet
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
- Overrides:
doGet
in classComponentRequestRouter<T extends WebComponentController<R>>
-
getDestination
public final String getDestination(String path, T componentSC, HttpRequest request)
Description copied from class:ComponentRequestRouter
This method has to be implemented by the component request Router it has to compute a destination page- Specified by:
getDestination
in classComponentRequestRouter<T extends WebComponentController<R>>
- Parameters:
path
- The entering request function (ex : "Main.jsp", when accessing "http://localhost/webactiv/Ralmanach/jsp/Main.jsp")componentSC
- The component Session Controller, build and initialised.request
- The entering request. The request Router need it to get parameters- Returns:
- The complete destination URL for a forward (ex : "/almanach/jsp/almanach.jsp?flag=user")
-
-