public class EndPointProxyController
extends org.springframework.web.servlet.mvc.AbstractController
Provides the ability to submit a URL request via a configured end-point such as a remote Alfresco Server or any remote machine that supports an HTTP REST interface. Makes use of the Connector framework so that appropriate authentication is automatically applied to the proxied request as applicable.
This servlet accepts URIs of the following format:
/proxy/<endpointid>[/<uri>]*[?[<argName>=<argValue>]*]Where:
- endpointid is the ID of a configured EndPoint model object to make a request against
- url is the uri to call on the EndPoint URL e.g. /api/sites
- argName is the name of a URL argument to append to the request
- argValue is the value of URL argument
E.g.
/proxy/alfresco/api/sites?name=mysite&desc=descriptionThe proxy supports all valid HTTP methods supported by the RemoteClient.
RemoteClient| Modifier and Type | Field and Description |
|---|---|
protected RemoteConfigElement |
config |
protected ConfigService |
configService |
protected ConnectorService |
connectorService |
protected ProxyControllerInterceptor |
proxyControllerInterceptor |
| Constructor and Description |
|---|
EndPointProxyController() |
| Modifier and Type | Method and Description |
|---|---|
RemoteConfigElement |
getRemoteConfig()
Gets the remote config.
|
org.springframework.web.servlet.ModelAndView |
handleRequestInternal(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res) |
void |
setBasicHttpAuthChallenge(boolean basicHttpAuthChallenge)
Deprecated.
|
void |
setConfigService(ConfigService configService)
Sets the config service.
|
void |
setConnectorService(ConnectorService connectorService)
Sets the connector service.
|
void |
setProxyControllerInterceptor(ProxyControllerInterceptor proxyControllerInterceptor)
Set the ProxyControllerInterceptor reference
|
handleRequest, isSynchronizeOnSession, setSynchronizeOnSessionapplyCacheSeconds, applyCacheSeconds, cacheForSeconds, cacheForSeconds, checkAndPrepare, checkAndPrepare, getCacheSeconds, getSupportedMethods, isAlwaysMustRevalidate, isRequireSession, isUseCacheControlHeader, isUseCacheControlNoStore, isUseExpiresHeader, preventCaching, setAlwaysMustRevalidate, setCacheSeconds, setRequireSession, setSupportedMethods, setUseCacheControlHeader, setUseCacheControlNoStore, setUseExpiresHeadergetServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContextprotected ConfigService configService
protected ConnectorService connectorService
protected ProxyControllerInterceptor proxyControllerInterceptor
protected RemoteConfigElement config
public void setConfigService(ConfigService configService)
configService - the new config servicepublic void setConnectorService(ConnectorService connectorService)
connectorService - the new connector service@Deprecated public void setBasicHttpAuthChallenge(boolean basicHttpAuthChallenge)
basicHttpAuthChallenge - true to present a Basic HTTP Auth challenge with a 401 error, false otherwisepublic void setProxyControllerInterceptor(ProxyControllerInterceptor proxyControllerInterceptor)
proxyControllerInterceptor - the ProxyControllerInterceptorpublic RemoteConfigElement getRemoteConfig()
public org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
throws Exception
handleRequestInternal in class org.springframework.web.servlet.mvc.AbstractControllerExceptionCopyright © 2005–2021 Alfresco Software. All rights reserved.