com.vaadin.spring.server
Class SpringUIProvider

java.lang.Object
  extended by com.vaadin.server.UIProvider
      extended by com.vaadin.spring.server.SpringUIProvider
All Implemented Interfaces:
Serializable

public class SpringUIProvider
extends com.vaadin.server.UIProvider

Vaadin UIProvider that looks up UI classes from the Spring application context. The UI classes must be annotated with SpringUI.

Author:
Petter Holmström (petter@vaadin.com), Henri Sara (hesara@vaadin.com)
See Also:
Serialized Form

Field Summary
protected  org.slf4j.Logger logger
           
 
Constructor Summary
SpringUIProvider(org.springframework.web.context.WebApplicationContext webApplicationContext)
           
 
Method Summary
 com.vaadin.ui.UI createInstance(com.vaadin.server.UICreateEvent event)
           
protected  String deriveMappingForUI(String uiBeanName)
          Derive the name (path) for a UI based on its annotation parameters.
protected  void detectUIs()
           
protected  Class<? extends com.vaadin.ui.UI> getUIByPath(String path)
           
 Class<? extends com.vaadin.ui.UI> getUIClass(com.vaadin.server.UIClassSelectionEvent uiClassSelectionEvent)
           
protected  org.springframework.web.context.WebApplicationContext getWebApplicationContext()
           
protected  void mapPathToUI(String path, Class<? extends com.vaadin.ui.UI> uiClass)
           
 
Methods inherited from class com.vaadin.server.UIProvider
getAnnotationFor, getPageTitle, getPushMode, getPushTransport, getTheme, getWidgetset, isPreservedOnRefresh
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.slf4j.Logger logger
Constructor Detail

SpringUIProvider

public SpringUIProvider(org.springframework.web.context.WebApplicationContext webApplicationContext)
Method Detail

detectUIs

protected void detectUIs()

deriveMappingForUI

protected String deriveMappingForUI(String uiBeanName)
Derive the name (path) for a UI based on its annotation parameters. If a path is given as a parameter for the annotation, it is used. An empty string maps to the root context.

Parameters:
uiBeanName - name of the UI bean
Returns:
path to map the UI to

getUIClass

public Class<? extends com.vaadin.ui.UI> getUIClass(com.vaadin.server.UIClassSelectionEvent uiClassSelectionEvent)
Specified by:
getUIClass in class com.vaadin.server.UIProvider

getWebApplicationContext

protected org.springframework.web.context.WebApplicationContext getWebApplicationContext()

mapPathToUI

protected void mapPathToUI(String path,
                           Class<? extends com.vaadin.ui.UI> uiClass)

getUIByPath

protected Class<? extends com.vaadin.ui.UI> getUIByPath(String path)

createInstance

public com.vaadin.ui.UI createInstance(com.vaadin.server.UICreateEvent event)
Overrides:
createInstance in class com.vaadin.server.UIProvider


Copyright © 2015 Vaadin Ltd. All Rights Reserved.