| com.atlassian.bitbucket.scm.http.HttpScmRequestHandler |
Summary
| Public Methods |
|
@Nonnull
Optional<HttpScmRequest>
|
create(HttpServletRequest request, HttpServletResponse response)
Returns an HttpScmRequest to service the supplied request, or empty() if the request
could not be created.
|
|
void
|
sendAuthenticationError(AuthenticationState state, String summary, String detailMessage, HttpServletRequest request, HttpServletResponse response)
|
|
void
|
sendError(String summary, String detailMessage, HttpServletRequest request, HttpServletResponse response)
|
|
boolean
|
supports(HttpRequestDetails requestDetails)
Returns whether the handler can service the supplied request.
|
Public Methods
@Nonnull
public
Optional<HttpScmRequest>
create
(HttpServletRequest request, HttpServletResponse response)
Parameters
| request
| an HttpServletRequest targeting /scm/* (e.g. an HTTP request from the git client binary) |
| response
| the HttpServletResponse |
public
void
sendAuthenticationError
(AuthenticationState state, String summary, String detailMessage, HttpServletRequest request, HttpServletResponse response)
Parameters
| state
| the current state of the user's authentication, see AuthenticationState for details |
| summary
| an i18n'd message to (optionally) send to the client if it supports displaying custom messages |
| detailMessage
| a longer detailed explanation of the problem |
Throws
| IOException
| if there was a problem reading from the request or writing to the response
|
public
void
sendError
(String summary, String detailMessage, HttpServletRequest request, HttpServletResponse response)
Parameters
| summary
| an i18n'd message to (optionally) send to the client if it supports displaying custom messages |
| detailMessage
| a longer detailed explanation of the problem |
| request
| an HttpServletRequest targeting /scm/* (e.g. an HTTP request from the git client binary) |
| response
| the HttpServletResponse |
Throws
| IOException
| if there was a problem writing to the response
|
public
boolean
supports
(HttpRequestDetails requestDetails)
Parameters
| requestDetails
| HttpRequestDetails from the request targeting /scm/* (e.g. an HTTP request from the git client binary) |
Returns
true if the handler can service this request, false otherwise