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 void
afterPropertiesSet()
DisposablePerPluginRegistry
createWrapper(String pluginUUID)
ControllerAction
getAction(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)
PagePlace
getPlaceById(PlaceId placeId)
Returns page place having the specified idList<PlaceId>
getRegisteredPlaceIds()
void
registerAction(BaseController controller, ControllerAction controllerAction)
Register ControllerAction.void
registerController(String path, org.springframework.web.servlet.mvc.Controller controller)
Register another Spring controller in the Web application.void
registerPlaceId(PlaceId placeId)
Registers a new place id so thatPagePlacesEx.getRegisteredPlaceIds()
could return it.void
setHandlerMapping(UrlMapping handlerMapping)
void
unregisterAction(BaseController controller, ControllerAction controllerAction)
void
unregisterController(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:WebControllerManager
Register 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:
registerController
in 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:WebControllerManager
Register 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:
registerAction
in 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:WebControllerManager
Get an action, suitable for processing of the request and associated with the specified controller- Specified by:
getAction
in interfaceWebControllerManager
- Parameters:
controller
- controllerrequest
- request- Returns:
- controller action
-
getPlaceById
@NotNull public PagePlace getPlaceById(@NotNull PlaceId placeId)
Description copied from interface:PagePlaces
Returns page place having the specified id- Specified by:
getPlaceById
in 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:
getPagePlaces
in interfacePagePlacesEx
-
getRegisteredPlaceIds
@NotNull public List<PlaceId> getRegisteredPlaceIds()
- Specified by:
getRegisteredPlaceIds
in 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:PagePlacesEx
Registers a new place id so thatPagePlacesEx.getRegisteredPlaceIds()
could return it. Has the same effect asPagePlaces.getPlaceById(PlaceId)
.- Specified by:
registerPlaceId
in interfacePagePlacesEx
- Parameters:
placeId
- place id to register
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
createWrapper
@NotNull public DisposablePerPluginRegistry createWrapper(@NotNull String pluginUUID)
- Specified by:
createWrapper
in interfacePerPluginAwareRegistry
-
-