com.vaadin.spring.internal
Class UIScopeImpl

java.lang.Object
  extended by com.vaadin.spring.internal.UIScopeImpl
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.beans.factory.config.Scope

public class UIScopeImpl
extends Object
implements org.springframework.beans.factory.config.Scope, org.springframework.beans.factory.config.BeanFactoryPostProcessor

Implementation of Spring's Scope that binds the UIs and dependent beans to the current VaadinSession (as opposed to the current Servlet session). Registered by default as the scope " "vaadin-ui"".

Author:
Petter Holmström (petter@vaadin.com)
See Also:
UIScope

Nested Class Summary
static class UIScopeImpl.VaadinSessionBeanStoreRetrievalStrategy
          Implementation of BeanStoreRetrievalStrategy that stores the BeanStore in the current VaadinSession.
 
Field Summary
static String VAADIN_UI_SCOPE_NAME
           
 
Constructor Summary
UIScopeImpl()
           
 
Method Summary
 Object get(String s, org.springframework.beans.factory.ObjectFactory<?> objectFactory)
           
static BeanStoreRetrievalStrategy getBeanStoreRetrievalStrategy()
          Returns the UIScopeImpl.VaadinSessionBeanStoreRetrievalStrategy to use.
 String getConversationId()
           
 void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory configurableListableBeanFactory)
           
 void registerDestructionCallback(String s, Runnable runnable)
           
 Object remove(String s)
           
 Object resolveContextualObject(String s)
           
static void setBeanStoreRetrievalStrategy(BeanStoreRetrievalStrategy beanStoreRetrievalStrategy)
          Sets the UIScopeImpl.VaadinSessionBeanStoreRetrievalStrategy to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VAADIN_UI_SCOPE_NAME

public static final String VAADIN_UI_SCOPE_NAME
See Also:
Constant Field Values
Constructor Detail

UIScopeImpl

public UIScopeImpl()
Method Detail

setBeanStoreRetrievalStrategy

public static void setBeanStoreRetrievalStrategy(BeanStoreRetrievalStrategy beanStoreRetrievalStrategy)
Sets the UIScopeImpl.VaadinSessionBeanStoreRetrievalStrategy to use.


getBeanStoreRetrievalStrategy

public static BeanStoreRetrievalStrategy getBeanStoreRetrievalStrategy()
Returns the UIScopeImpl.VaadinSessionBeanStoreRetrievalStrategy to use. By default, UIScopeImpl.VaadinSessionBeanStoreRetrievalStrategy is used.


get

public Object get(String s,
                  org.springframework.beans.factory.ObjectFactory<?> objectFactory)
Specified by:
get in interface org.springframework.beans.factory.config.Scope

remove

public Object remove(String s)
Specified by:
remove in interface org.springframework.beans.factory.config.Scope

registerDestructionCallback

public void registerDestructionCallback(String s,
                                        Runnable runnable)
Specified by:
registerDestructionCallback in interface org.springframework.beans.factory.config.Scope

resolveContextualObject

public Object resolveContextualObject(String s)
Specified by:
resolveContextualObject in interface org.springframework.beans.factory.config.Scope

getConversationId

public String getConversationId()
Specified by:
getConversationId in interface org.springframework.beans.factory.config.Scope

postProcessBeanFactory

public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory configurableListableBeanFactory)
                            throws org.springframework.beans.BeansException
Specified by:
postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessor
Throws:
org.springframework.beans.BeansException


Copyright © 2016 Vaadin Ltd. All Rights Reserved.