org.springframework.extensions.surf.mvc
Class AbstractWebFrameworkController

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.surf.mvc.AbstractWebFrameworkController
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.web.context.ServletContextAware, org.springframework.web.servlet.mvc.Controller
Direct Known Subclasses:
PreviewController

public abstract class AbstractWebFrameworkController
extends org.springframework.web.servlet.mvc.AbstractController
implements org.springframework.web.context.ServletContextAware

Abstract Spring MVC Controller that produces Surf Views. Developers who wish to implement custom Spring controllers for use with Alfresco Surf will benefit by extending from this class. This class provides member functions for accessing the application context as well as important Surf services.

Author:
muzquiano

Field Summary
 
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
AbstractWebFrameworkController()
           
 
Method Summary
abstract  org.springframework.web.servlet.ModelAndView createModelAndView(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Internal method to be implemented by inheriting class to create model and view for the controller.
abstract  org.apache.commons.logging.Log getLogger()
          Returns a logger for the controller
 RenderService getRenderService()
          Gets the render service.
 WebFrameworkServiceRegistry getServiceRegistry()
          Gets the service registry.
 WebFrameworkConfigElement getWebFrameworkConfiguration()
          Gets the web framework configuration.
 WebFrameworkManager getWebFrameworkManager()
          Gets the web framework manager.
 org.springframework.web.servlet.ModelAndView handleRequestInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void setServiceRegistry(WebFrameworkServiceRegistry webFrameworkServiceRegistry)
          Sets the service registry.
 
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
 
Methods inherited from interface org.springframework.web.context.ServletContextAware
setServletContext
 

Constructor Detail

AbstractWebFrameworkController

public AbstractWebFrameworkController()
Method Detail

setServiceRegistry

public void setServiceRegistry(WebFrameworkServiceRegistry webFrameworkServiceRegistry)
Sets the service registry.

Parameters:
webFrameworkServiceRegistry - the new service registry

getServiceRegistry

public WebFrameworkServiceRegistry getServiceRegistry()
Gets the service registry.

Returns:
the service registry

getWebFrameworkConfiguration

public WebFrameworkConfigElement getWebFrameworkConfiguration()
Gets the web framework configuration.

Returns:
the web framework configuration

getWebFrameworkManager

public WebFrameworkManager getWebFrameworkManager()
Gets the web framework manager.

Returns:
the web framework manager

getRenderService

public RenderService getRenderService()
Gets the render service.

Returns:
the render service

handleRequestInternal

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

createModelAndView

public abstract org.springframework.web.servlet.ModelAndView createModelAndView(javax.servlet.http.HttpServletRequest request,
                                                                                javax.servlet.http.HttpServletResponse response)
                                                                         throws Exception
Internal method to be implemented by inheriting class to create model and view for the controller.

Parameters:
request -
response -
Returns:
ModelAndView
Throws:
Exception

getLogger

public abstract org.apache.commons.logging.Log getLogger()
Returns a logger for the controller

Returns:
logger


Copyright © 2009 SpringSource, Inc. All Rights Reserved.