Package jetbrains.buildServer.web.impl
Class WebControllerManagerImpl
- java.lang.Object
-
- jetbrains.buildServer.web.impl.WebControllerManagerImpl
-
- All Implemented Interfaces:
PerPluginAwareRegistry,PagePlaces,WebControllerManager,PagePlacesEx,org.springframework.beans.factory.InitializingBean
public class WebControllerManagerImpl extends Object implements WebControllerManager, PagePlacesEx, org.springframework.beans.factory.InitializingBean, PerPluginAwareRegistry
- Author:
- Kir
-
-
Constructor Summary
Constructors Constructor Description WebControllerManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()DisposablePerPluginRegistrycreateWrapper(String pluginUUID)ControllerActiongetAction(BaseController controller, javax.servlet.http.HttpServletRequest request)Get an action, suitable for processing of the request and associated with the specified controllerList<PagePlace>getPagePlaces(javax.servlet.http.HttpServletRequest request)PagePlacegetPlaceById(PlaceId placeId)Returns page place having the specified idList<PlaceId>getRegisteredPlaceIds()voidregisterAction(BaseController controller, ControllerAction controllerAction)Register ControllerAction.voidregisterController(String path, org.springframework.web.servlet.mvc.Controller controller)Register another Spring controller in the Web application.voidregisterPlaceId(PlaceId placeId)Registers a new place id so thatPagePlacesEx.getRegisteredPlaceIds()could return it.voidsetHandlerMapping(UrlMapping handlerMapping)voidunregisterAction(BaseController controller, ControllerAction controllerAction)voidunregisterController(org.springframework.web.servlet.mvc.Controller controller)
-
-
-
Method Detail
-
setHandlerMapping
public void setHandlerMapping(@NotNull UrlMapping handlerMapping)
-
unregisterController
public void unregisterController(@NotNull org.springframework.web.servlet.mvc.Controller controller)
-
registerController
public void registerController(@NotNull String path, @NotNull org.springframework.web.servlet.mvc.Controller controller)Description copied from interface:WebControllerManagerRegister another Spring controller in the Web application.
By default all controllers require logged in user and if there is no such user in the session redirect to the login page is sent. If your controller does not require logged in user you can indicate this viaAuthorizationInterceptor.
If you need to check any permissions before processing request, seeRequestPermissionsChecker
Note that by default controller will receive requests if URL ends with .html. If controller needs to handle requests to any resources (with any suffixes) then it should use syntax like: /app/<path>/** where <path> can be any string and prefix /app is required. URLs to such controllers will look like: http://server/app/<path>/resource.- Specified by:
registerControllerin interfaceWebControllerManager- Parameters:
path- path to register controller for (must start with /)controller- controller to register
-
registerAction
public void registerAction(@NotNull BaseController controller, @NotNull ControllerAction controllerAction)Description copied from interface:WebControllerManagerRegister ControllerAction. Such action is invoked when using urls like /action.html?parameters or /ajax.html?parameters. In the latter caseControllerAction.process(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.jdom.Element)will get not null ajaxResponse parameter.- Specified by:
registerActionin interfaceWebControllerManager- Parameters:
controller- controller to associate action withcontrollerAction- action
-
unregisterAction
public void unregisterAction(@NotNull BaseController controller, @NotNull ControllerAction controllerAction)
-
getAction
@Nullable public ControllerAction getAction(@NotNull BaseController controller, @NotNull javax.servlet.http.HttpServletRequest request)
Description copied from interface:WebControllerManagerGet an action, suitable for processing of the request and associated with the specified controller- Specified by:
getActionin interfaceWebControllerManager- Parameters:
controller- controllerrequest- request- Returns:
- controller action
-
getPlaceById
@NotNull public PagePlace getPlaceById(@NotNull PlaceId placeId)
Description copied from interface:PagePlacesReturns page place having the specified id- Specified by:
getPlaceByIdin interfacePagePlaces- Parameters:
placeId- id of the page place- Returns:
- page place with the specified id
-
getPagePlaces
@NotNull public List<PagePlace> getPagePlaces(@NotNull javax.servlet.http.HttpServletRequest request)
- Specified by:
getPagePlacesin interfacePagePlacesEx
-
getRegisteredPlaceIds
@NotNull public List<PlaceId> getRegisteredPlaceIds()
- Specified by:
getRegisteredPlaceIdsin interfacePagePlacesEx- Returns:
- all known Place ids:
- all PlaceId constants from
PlaceId - all registered place ids via
PagePlacesEx.registerPlaceId(PlaceId) - all registered place ids via
PagePlaces.getPlaceById(PlaceId)
- all PlaceId constants from
-
registerPlaceId
public void registerPlaceId(@NotNull PlaceId placeId)Description copied from interface:PagePlacesExRegisters a new place id so thatPagePlacesEx.getRegisteredPlaceIds()could return it. Has the same effect asPagePlaces.getPlaceById(PlaceId).- Specified by:
registerPlaceIdin interfacePagePlacesEx- Parameters:
placeId- place id to register
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
createWrapper
@NotNull public DisposablePerPluginRegistry createWrapper(@NotNull String pluginUUID)
- Specified by:
createWrapperin interfacePerPluginAwareRegistry
-
-