Package org.exoplatform.web
Class WebAppController
java.lang.Object
org.exoplatform.web.WebAppController
- All Implemented Interfaces:
org.picocontainer.Startable
The WebAppController is the entry point of the GateIn service.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final QualifiedName.protected static org.exoplatform.services.log.Log. -
Constructor Summary
ConstructorsConstructorDescriptionWebAppController(org.exoplatform.container.xml.InitParams params) Must have 'controller.config' as init parameter configuration (in xml) that point to the controller.xml used to initialize navigation controller This service component is a container for applications: PortalApplication, PortletApplication.... -
Method Summary
Modifier and TypeMethodDescription<T extends Application>
TaddApplication(T app) Add application (portlet, gadget) to the global application map if and only if it has not been registered yet.findRoutes(String uri) <T extends Application>
TgetApplication(String appId) getApplicationByType(String type) getAttribute(String name, Object value) getHandler(String handlerName) voidloadConfiguration(String path) protected voidloadConfiguration(URL url) voidonHandlersInit(jakarta.servlet.ServletConfig config) Delegate init action to handler, for example: PortalRequestHandler have a change to create and register PortalApplication with WebAppControllervoidregister(WebRequestHandler handler) Register an handler as a component plugin, this method is invoked by the kernel with reflection.voidvoidremoveApplication(String appId) voidservice(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) This is the first method - in the GateIn portal - reached by incoming HTTP request, it acts like a servlet service() method.voidstart()voidstop()voidunregister(String[] paths)
-
Field Details
-
HANDLER_PARAM
. -
log
protected static org.exoplatform.services.log.Log log.
-
-
Constructor Details
-
WebAppController
Must have 'controller.config' as init parameter configuration (in xml) that point to the controller.xml used to initialize navigation controller This service component is a container for applications: PortalApplication, PortletApplication.... It use the navigation controller to route the request to corresponding handlers (config as service plugin)- Parameters:
params- the init params- Throws:
Exception- any exception
-
-
Method Details
-
getAttribute
-
getApplication
-
getApplicationByType
-
removeApplication
-
getConfigurationPath
-
loadConfiguration
- Throws:
IOExceptionRouterConfigException
-
loadConfiguration
- Throws:
RouterConfigExceptionIOException
-
reloadConfiguration
- Throws:
RouterConfigExceptionIOException
-
findRoutes
-
getHandler
-
addApplication
Add application (portlet, gadget) to the global application map if and only if it has not been registered yet.- Type Parameters:
T-- Parameters:
app-- Returns:
-
register
Register an handler as a component plugin, this method is invoked by the kernel with reflection.- Parameters:
handler- the handler
-
unregister
-
onHandlersInit
Delegate init action to handler, for example: PortalRequestHandler have a change to create and register PortalApplication with WebAppController- Parameters:
config-- Throws:
Exception
-
getRouter
-
service
public void service(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse res) throws Exception This is the first method - in the GateIn portal - reached by incoming HTTP request, it acts like a servlet service() method. According to the servlet path used the correct handler is selected and then executed.
During a request the request life cycle is demarcated by calls to
RequestLifeCycle.begin(ExoContainer)andRequestLifeCycle.end().- Parameters:
req- the http requestres- the http response- Throws:
Exception- any exception
-
start
public void start()- Specified by:
startin interfaceorg.picocontainer.Startable
-
stop
public void stop()- Specified by:
stopin interfaceorg.picocontainer.Startable
-