public class RYRequestFactory extends Object implements com.atlassian.applinks.api.ApplicationLinkRequestFactory
Modifier and Type | Class and Description |
---|---|
static class |
RYRequestFactory.RYApplinkRequest
This class intercepts the original Applink requests for 2 reasons:
- To add convenience methods,
- To intercept the fields and log them, if logging is wanted
|
Constructor and Description |
---|
RYRequestFactory(org.apache.log4j.Logger log,
com.atlassian.applinks.api.ApplicationLinkRequestFactory delegate,
Supplier<javax.servlet.http.HttpServletRequest> requestSupplier,
Supplier<String> hostUrl,
com.atlassian.applinks.api.ApplicationLink applink) |
Modifier and Type | Method and Description |
---|---|
RYRequestFactory.RYApplinkRequest |
createRequest(com.atlassian.sal.api.net.Request.MethodType methodType,
String url) |
RYRequestFactory.RYApplinkRequest |
createRequest2(com.atlassian.sal.api.net.Request.MethodType methodType,
String url) |
URI |
getAuthorisationURI() |
URI |
getAuthorisationURI(URI callback) |
ApplinkException |
getException(com.atlassian.sal.api.net.Request.MethodType method,
String url,
com.atlassian.sal.api.net.Response response,
String message)
Utility method to create the correct exception (CredentialsException if HTTP 401, ApplinkException for other errors)
|
public RYRequestFactory.RYApplinkRequest createRequest(com.atlassian.sal.api.net.Request.MethodType methodType, String url) throws com.atlassian.applinks.api.CredentialsRequiredException
createRequest
in interface com.atlassian.applinks.api.ApplicationLinkRequestFactory
com.atlassian.applinks.api.CredentialsRequiredException
public RYRequestFactory.RYApplinkRequest createRequest2(com.atlassian.sal.api.net.Request.MethodType methodType, String url) throws CredentialsException
CredentialsException
public URI getAuthorisationURI(URI callback)
getAuthorisationURI
in interface com.atlassian.applinks.api.AuthorisationURIGenerator
public URI getAuthorisationURI()
getAuthorisationURI
in interface com.atlassian.applinks.api.AuthorisationURIGenerator
public ApplinkException getException(com.atlassian.sal.api.net.Request.MethodType method, String url, com.atlassian.sal.api.net.Response response, String message)
Copyright © 2020 Play SQL. All rights reserved.