|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.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
public abstract class BaseFormXmlController
Controller which output is xml in case of POST request and usual response in case of GET.
| Field Summary |
|---|
| Fields inherited from class jetbrains.buildServer.controllers.BaseController |
|---|
myServer |
| Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator |
|---|
METHOD_GET, METHOD_HEAD, METHOD_POST |
| Fields inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
logger |
| Constructor Summary | |
|---|---|
protected |
BaseFormXmlController()
Constructor |
|
BaseFormXmlController(SBuildServer server)
Constructor |
| Method Summary | ||
|---|---|---|
protected void |
addMessage(javax.servlet.http.HttpServletRequest request,
java.lang.String key,
java.lang.String text,
java.lang.String... parameters)
Adds a messages to the messages storage associated with specified request. |
|
protected org.springframework.validation.BindingResult |
bindFromRequest(javax.servlet.http.HttpServletRequest request,
java.lang.Object bean)
Binds the specified bean properties from the HTTP request. |
|
protected abstract org.springframework.web.servlet.ModelAndView |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Implement this method to process GET requests. |
|
protected org.springframework.web.servlet.ModelAndView |
doHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Performs actual request processing |
|
protected abstract void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.jdom.Element xmlResponse)
Implement this method to process POST requests. |
|
protected void |
forgetFormBean(javax.servlet.http.HttpServletRequest request,
java.lang.Class clazz)
Removes a form bean of the specified class from the session. |
|
protected void |
forgetFormBean(javax.servlet.http.HttpServletRequest request,
java.lang.Class clazz,
java.lang.String customKey)
Removes a form bean of the specified class from the session. |
|
protected
|
getOrCreateFormBean(javax.servlet.http.HttpServletRequest request,
java.lang.Class<T> clazz,
FormUtil.FormCreator<T> formBeanCreator)
Retrieves or creates (using the specified form bean creator) a form bean of the specified class. |
|
protected
|
getOrCreateFormBean(javax.servlet.http.HttpServletRequest request,
java.lang.Class<T> clazz,
java.lang.String customKey,
FormUtil.FormCreator<T> formBeanCreator)
Retrieves or creates (using the specified form bean creator) a form bean of the specified class. |
|
protected boolean |
isInitPageRequest(javax.servlet.http.HttpServletRequest request)
Returns true if request contains parameter: init. |
|
protected org.springframework.web.servlet.ModelAndView |
selfRedirectOnInit(javax.servlet.http.HttpServletRequest request)
|
|
protected void |
writeErrors(org.jdom.Element xmlResponse,
ActionErrors errors)
Writes errors to the XML response. |
|
protected void |
writeRedirect(org.jdom.Element xmlResponse,
java.lang.String url)
Writes redirect to the XML response. |
|
| Methods inherited from class jetbrains.buildServer.controllers.BaseController |
|---|
getOrCreateMessages, handleRequestInternal, isGet, isPost, simpleView |
| Methods inherited from class org.springframework.web.servlet.mvc.AbstractController |
|---|
handleRequest, isSynchronizeOnSession, setSynchronizeOnSession |
| Methods inherited from class org.springframework.web.servlet.support.WebContentGenerator |
|---|
applyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeader |
| Methods inherited from class org.springframework.web.context.support.WebApplicationObjectSupport |
|---|
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext |
| Methods inherited from class org.springframework.context.support.ApplicationObjectSupport |
|---|
getApplicationContext, getMessageSourceAccessor, initApplicationContext, requiredContextClass, setApplicationContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseFormXmlController(SBuildServer server)
server - SBuildServer instanceprotected BaseFormXmlController()
| Method Detail |
|---|
@Nullable
protected org.springframework.web.servlet.ModelAndView doHandle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
BaseController
doHandle in class BaseControllerrequest - HTTP requestresponse - HTTP response
java.lang.Exception - exception
protected abstract org.springframework.web.servlet.ModelAndView doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - HTTP requestresponse - HTTP response
protected abstract void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.jdom.Element xmlResponse)
ActionErrors can be used.
To add messages (if request processing was successful) use addMessage(javax.servlet.http.HttpServletRequest, String, String, String...) method.
request - HTTP requestresponse - HTTP responsexmlResponse - XML response for AJAX requests
protected void writeRedirect(org.jdom.Element xmlResponse,
java.lang.String url)
xmlResponse - XML responseurl - URL
protected void writeErrors(org.jdom.Element xmlResponse,
ActionErrors errors)
xmlResponse - XML responseerrors - errors
protected org.springframework.validation.BindingResult bindFromRequest(javax.servlet.http.HttpServletRequest request,
java.lang.Object bean)
request - HTTP requestbean - bean
protected <T> T getOrCreateFormBean(javax.servlet.http.HttpServletRequest request,
java.lang.Class<T> clazz,
FormUtil.FormCreator<T> formBeanCreator)
request - HTTP requestclazz - classformBeanCreator - form bean creator
protected <T> T getOrCreateFormBean(javax.servlet.http.HttpServletRequest request,
java.lang.Class<T> clazz,
java.lang.String customKey,
FormUtil.FormCreator<T> formBeanCreator)
request - HTTP requestclazz - classcustomKey - additional key identifying the form bean in the sessionformBeanCreator - form bean creator
protected void forgetFormBean(javax.servlet.http.HttpServletRequest request,
java.lang.Class clazz)
request - HTTP requestclazz - class
protected void forgetFormBean(javax.servlet.http.HttpServletRequest request,
java.lang.Class clazz,
java.lang.String customKey)
request - HTTP requestclazz - classcustomKey - additional keyprotected boolean isInitPageRequest(javax.servlet.http.HttpServletRequest request)
request - HTTP request
protected void addMessage(@NotNull
javax.servlet.http.HttpServletRequest request,
@NotNull
java.lang.String key,
java.lang.String text,
java.lang.String... parameters)
request - HTTP requestkey - message keytext - messageparameters - if specified then substrings like {0}, {1}, {2} and so on will be replaced with parameter with corresponding index.
Note that parameter will be passed through WebUtil.escapeXml(String) function before inserted into the resulting message.
protected org.springframework.web.servlet.ModelAndView selfRedirectOnInit(@NotNull
javax.servlet.http.HttpServletRequest request)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||