Package com.vaadin.flow.spring.scopes
Class VaadinUIScope
- java.lang.Object
-
- com.vaadin.flow.spring.scopes.VaadinUIScope
-
- All Implemented Interfaces:
org.springframework.beans.factory.config.BeanFactoryPostProcessor,org.springframework.beans.factory.config.Scope
public class VaadinUIScope extends Object
Implementation of Spring'sScopethat binds the beans to the currentUI. Registered by default as the scope " "vaadin-ui"".- Author:
- Vaadin Ltd
- See Also:
UIScope
-
-
Field Summary
Fields Modifier and Type Field Description static StringVAADIN_UI_SCOPE_NAME
-
Constructor Summary
Constructors Constructor Description VaadinUIScope()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectget(String name, org.springframework.beans.factory.ObjectFactory<?> objectFactory)protected com.vaadin.flow.spring.scopes.BeanStoregetBeanStore()Gets bean store for this scope.StringgetConversationId()protected VaadinSessiongetVaadinSession()Gets current Vaadin session.voidpostProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)voidregisterDestructionCallback(String name, Runnable callback)Objectremove(String name)ObjectresolveContextualObject(String key)
-
-
-
Field Detail
-
VAADIN_UI_SCOPE_NAME
public static final String VAADIN_UI_SCOPE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
postProcessBeanFactory
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
-
getConversationId
public String getConversationId()
-
getBeanStore
protected com.vaadin.flow.spring.scopes.BeanStore getBeanStore()
Gets bean store for this scope.- Returns:
- bean store for the scope
-
resolveContextualObject
public Object resolveContextualObject(String key)
- Specified by:
resolveContextualObjectin interfaceorg.springframework.beans.factory.config.Scope
-
get
public Object get(String name, org.springframework.beans.factory.ObjectFactory<?> objectFactory)
- Specified by:
getin interfaceorg.springframework.beans.factory.config.Scope
-
remove
public Object remove(String name)
- Specified by:
removein interfaceorg.springframework.beans.factory.config.Scope
-
registerDestructionCallback
public void registerDestructionCallback(String name, Runnable callback)
- Specified by:
registerDestructionCallbackin interfaceorg.springframework.beans.factory.config.Scope
-
getVaadinSession
protected VaadinSession getVaadinSession()
Gets current Vaadin session.Throws
IllegalStateExceptionif there is no current Vaadin session scope or it's not opened.- Returns:
- the current Vaadin session
-
-