Class BulkInvestigateDialogController
- java.lang.Object
-
- org.springframework.context.support.ApplicationObjectSupport
-
- org.springframework.web.context.support.WebApplicationObjectSupport
-
- org.springframework.web.servlet.support.WebContentGenerator
-
- org.springframework.web.servlet.mvc.AbstractController
-
- jetbrains.buildServer.controllers.BaseController
-
- jetbrains.buildServer.controllers.BaseFormXmlController
-
- jetbrains.buildServer.controllers.tests.BulkInvestigateDialogController
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.web.context.ServletContextAware
,org.springframework.web.servlet.mvc.Controller
public class BulkInvestigateDialogController extends BaseFormXmlController
- Since:
- 6.5
- Author:
- Maxim Podkolzine (maxim.podkolzine@jetbrains.com), Kir Maximov
-
-
Field Summary
Fields Modifier and Type Field Description static String
PARAM_COMMENT
HTTP request parameter which corresponds to the investigation comment.static String
PARAM_INVESTIGATOR_ID
static String
PARAM_ORIG_PROJECT_ID
static String
PARAM_REMOVE_INVESTIGATION
HTTP request parameter which corresponds toResponsibilityEntry.RemoveMethod
.static String
PARAM_UNMUTE
HTTP request parameter which corresponds toUnmuteOptionType
.-
Fields inherited from class jetbrains.buildServer.controllers.BaseController
myServer
-
-
Constructor Summary
Constructors Constructor Description BulkInvestigateDialogController(SBuildServer server, WebControllerManager webControllerManager, STestManager testManager, ProblemMutingService problemMutingService, SecurityContext securityContext, ProjectsCommittersCalculator projectsCommittersCalculator, ResponsibilityFacadeEx responsibilityFacade, RequestBuildProblemFinder requestBuildProblemFinder, UserModel userModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.web.servlet.ModelAndView
doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Implement this method to process GET requests.protected void
doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.jdom.Element xmlResponse)
Implement this method to process POST requests.protected boolean
isPost(javax.servlet.http.HttpServletRequest request)
-
Methods inherited from class jetbrains.buildServer.controllers.BaseFormXmlController
addMessage, bindFromRequest, doHandle, forgetFormBean, forgetFormBean, getOrCreateFormBean, getOrCreateFormBean, isInitPageRequest, selfRedirectOnInit, writeErrors, writeRedirect
-
Methods inherited from class jetbrains.buildServer.controllers.BaseController
getOrCreateMessages, handleRequest, handleRequestInternal, isGet, redirectTo, setExceptionResolvers, simpleView
-
Methods inherited from class org.springframework.web.servlet.mvc.AbstractController
isSynchronizeOnSession, setSynchronizeOnSession
-
Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator
applyCacheControl, applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, checkRequest, getAllowHeader, getCacheControl, getCacheSeconds, getSupportedMethods, getVaryByRequestHeaders, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, prepareResponse, preventCaching, setAlwaysMustRevalidate, setCacheControl, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader, setVaryByRequestHeaders
-
Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
-
-
-
-
Field Detail
-
PARAM_REMOVE_INVESTIGATION
public static final String PARAM_REMOVE_INVESTIGATION
HTTP request parameter which corresponds to
ResponsibilityEntry.RemoveMethod
. A value of 0 corresponds toResponsibilityEntry.RemoveMethod.WHEN_FIXED
, 1 toResponsibilityEntry.RemoveMethod.MANUALLY
("reverse ordinal"), and -1 to "no preference" (doGet(HttpServletRequest, HttpServletResponse)
only, seeBulkInvestigateDialogController.GetRequestProcessor.presetResponsibilityData(BulkInvestigateBean, RemoveMethod, List)
).- See Also:
BulkInvestigateDialogController.GetRequestProcessor.presetResponsibilityData(BulkInvestigateBean, RemoveMethod, List)
, "investigation.js", Constant Field Values
-
PARAM_UNMUTE
public static final String PARAM_UNMUTE
HTTP request parameter which corresponds to
UnmuteOptionType
. An empty string value corresponds to "no preference" (doGet(HttpServletRequest, HttpServletResponse)
only).- See Also:
- "investigation.js", Constant Field Values
-
PARAM_COMMENT
public static final String PARAM_COMMENT
HTTP request parameter which corresponds to the investigation comment.
- See Also:
- "investigation.js", Constant Field Values
-
PARAM_INVESTIGATOR_ID
public static final String PARAM_INVESTIGATOR_ID
- See Also:
- Constant Field Values
-
PARAM_ORIG_PROJECT_ID
public static final String PARAM_ORIG_PROJECT_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BulkInvestigateDialogController
public BulkInvestigateDialogController(@NotNull SBuildServer server, @NotNull WebControllerManager webControllerManager, @NotNull STestManager testManager, @NotNull ProblemMutingService problemMutingService, @NotNull SecurityContext securityContext, @NotNull ProjectsCommittersCalculator projectsCommittersCalculator, @NotNull ResponsibilityFacadeEx responsibilityFacade, @NotNull RequestBuildProblemFinder requestBuildProblemFinder, @NotNull UserModel userModel)
-
-
Method Detail
-
isPost
protected boolean isPost(@NotNull javax.servlet.http.HttpServletRequest request)
This implementation has two side effects:
- the actual HTTP method is ignored (and HTTP POST and HTTP GET behave identically, provided GET request parameters are not truncated by the browser, which is unlikely, since neither 2k limit of MSIE 8 nor 64k limit of other browsers can be exceeded by typical parameters. Anyway, TeamCity always uses HTTP POST internally);
doGet(HttpServletRequest, HttpServletResponse)
anddoPost(HttpServletRequest, HttpServletResponse, Element)
are selected based on a request parameter rather than request method, and implement different logic.
- Overrides:
isPost
in classBaseController
- See Also:
BaseController.isPost(HttpServletRequest)
-
doGet
protected org.springframework.web.servlet.ModelAndView doGet(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response)
Implement this method to process GET requests. Usually on GET request a form bean is created and a page is shown.Triggered via
/tests/bulkInvestigate.html
, regardless of the actual HTTP method (GET or POST). TeamCity always uses HTTP POST internally.Invocation results in the "Investigate/Mute/Fix" dialog being brought up. HTTP response content is HTML.
- Specified by:
doGet
in classBaseFormXmlController
- Parameters:
request
- HTTP requestresponse
- HTTP response- Returns:
- model and view components
- See Also:
BaseFormXmlController.doGet(HttpServletRequest, HttpServletResponse)
-
doPost
protected void doPost(@NotNull javax.servlet.http.HttpServletRequest request, @NotNull javax.servlet.http.HttpServletResponse response, @NotNull org.jdom.Element xmlResponse)
Implement this method to process POST requests. Usually POST requests are changing state of the form bean and underlying model. To output errors (if request validation failed)ActionErrors
can be used. To add messages (if request processing was successful) useBaseFormXmlController.addMessage(javax.servlet.http.HttpServletRequest, String, String, String...)
method.Triggered via
/tests/bulkInvestigate.html?post=true
, regardless of the actual HTTP method (GET or POST). TeamCity always uses HTTP POST internally.Invocation results in the investigation details being saved or updated. HTTP response content is XML.
- Specified by:
doPost
in classBaseFormXmlController
- Parameters:
response
- HTTP response (ignored).request
- HTTP requestxmlResponse
- XML response for AJAX requests- See Also:
BaseFormXmlController.doPost(HttpServletRequest, HttpServletResponse, Element)
-
-