org.springframework.extensions.webscripts.servlet.mvc
Class EndPointProxyController

java.lang.Object
  extended by org.springframework.context.support.ApplicationObjectSupport
      extended by org.springframework.web.context.support.WebApplicationObjectSupport
          extended by org.springframework.web.servlet.support.WebContentGenerator
              extended by org.springframework.web.servlet.mvc.AbstractController
                  extended by org.springframework.extensions.webscripts.servlet.mvc.EndPointProxyController
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller

public class EndPointProxyController
extends org.springframework.web.servlet.mvc.AbstractController

EndPoint HTTP Proxy Controller for Spring MVC. Provides the ability to submit a URL request via a configured end point such as a remote Alfresco Server. 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/[/uri]*[?[=]*] 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=description The proxy supports all valid HTTP methods.

Author:
kevinr, muzquiano

Field Summary
protected  RemoteConfigElement config
           
protected  ConfigService configService
           
protected  ConnectorService connectorService
           
 
Fields inherited from class org.springframework.web.servlet.support.WebContentGenerator
METHOD_GET, METHOD_HEAD, METHOD_POST
 
Constructor Summary
EndPointProxyController()
           
 
Method Summary
 RemoteConfigElement getRemoteConfig()
          Gets the remote config.
 org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 void setConfigService(ConfigService configService)
          Sets the config service.
 void setConnectorService(ConnectorService connectorService)
          Sets the connector service.
 
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
 

Field Detail

configService

protected ConfigService configService

config

protected RemoteConfigElement config

connectorService

protected ConnectorService connectorService
Constructor Detail

EndPointProxyController

public EndPointProxyController()
Method Detail

setConfigService

public void setConfigService(ConfigService configService)
Sets the config service.

Parameters:
configService - the new config service

setConnectorService

public void setConnectorService(ConnectorService connectorService)
Sets the connector service.

Parameters:
connectorService - the new connector service

getRemoteConfig

public RemoteConfigElement getRemoteConfig()
Gets the remote config.

Returns:
the remote config

handleRequestInternal

public org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest req,
                                                                          javax.servlet.http.HttpServletResponse res)
                                                                   throws Exception
Specified by:
handleRequestInternal in class org.springframework.web.servlet.mvc.AbstractController
Throws:
Exception


Copyright © 2009 SpringSource, Inc. All Rights Reserved.