Class DispatcherByAnnotationSpringAccess
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<String,Object>
org.eclnt.jsfserver.managedbean.DefaultDispatcher
org.eclnt.workplace.WorkpageDispatcher
org.eclnt.ccee.spring.v2.context.annotationbased.DispatcherByAnnotationSpringAccess
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
,Object> ICCEEConstants
,org.eclnt.jsfserver.defaultscreens.Statusbar.IStatusBarDrillDownInfoProvider
,org.eclnt.jsfserver.managedbean.IDispatcher
,org.eclnt.workplace.IWorkpageDispatcher
public abstract class DispatcherByAnnotationSpringAccess
extends org.eclnt.workplace.WorkpageDispatcher
implements ICCEEConstants
Dispatcher that uses Spring context to access page beans. If the expressions
from the page processing is "#{d.XyzUI.xxx}, then the "XyzUI" is resolved
in the following way:
1. the Spring context is requested for a bean with name "XyzUI"
2. if this object is NOT available then the normal resolution of beans following the normal Dispatcher-functions is done.
This dispatcher creates one spring context (AbstractApplicationContext) per dialog session. This dispatcher-spring-context is a child of the normal application spring context. The creation of this dialog-session-spring-context is done through class
1. the Spring context is requested for a bean with name "XyzUI"
2. if this object is NOT available then the normal resolution of beans following the normal Dispatcher-functions is done.
This dispatcher creates one spring context (AbstractApplicationContext) per dialog session. This dispatcher-spring-context is a child of the normal application spring context. The creation of this dialog-session-spring-context is done through class
DialogSessionApplicationContextFactoryBase
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclnt.jsfserver.managedbean.DefaultDispatcher
org.eclnt.jsfserver.managedbean.DefaultDispatcher.DispatchedBeanInfo, org.eclnt.jsfserver.managedbean.DefaultDispatcher.DispatcherInfo
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,
V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.support.AbstractApplicationContext
Fields inherited from class org.eclnt.workplace.WorkpageDispatcher
m_isMaximized, m_statusbar, m_workpage, m_workpageContainer
Fields inherited from interface org.eclnt.ccee.ICCEEConstants
AND, ASC, AVG, BETWEEN, BRC, BRO, COUNT, DEFAULT_CONTEXT, DESC, FUNCTIONRESULT, GREATER, GREATEREQUAL, IN, IS, ISNOT, LIKE, LL_DBG, LL_ERR, LL_INF, LL_WAR, LOWER, LOWEREQUAL, MAX, MIN, NULL, OR, ORDERBY, QPFUNCTION_LOWER, QPFUNCTION_UPPER, SUM
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for the root dispatcher within the dialog session.DispatcherByAnnotationSpringAccess
(org.eclnt.workplace.IWorkpageContainer workpageContainer) Constructor for the sub dispatchers - if using the CaptainCasa Workplace management. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.springframework.context.support.AbstractApplicationContext
Creation of spring context.protected String[]
org.springframework.context.support.AbstractApplicationContext
The spring context that is used for resolving dispatched beans.static void
initializeIgnoreSpringInitializationErrors
(boolean value) If there are problems creating the Spring context then by default an Error is thrown during initialization.static void
initializeResolveBeanWithLowerCaseKey
(boolean value) When accessing beans from the spring context then the value of the expression is directly used.protected Object
readObject
(String key) Methods inherited from class org.eclnt.workplace.WorkpageDispatcher
checkIfToDrillDownToGlobalStatusbar, createModalPopup, createModelessPopup, createObjectInstance, createSubDispatcherInstance, createWorkpageContainer, destroy, findSessionTopWorkpageDispatcher, findSessionWorkpageContainer, getDialogSessionInstance, getDialogSessionInstance, getIsMaximized, getOwner, getPreferredConstructorArguentClass, getStatusbar, getToMaximizedSizeRendered, getToNormalSizeRendered, getTopOwner, getWorkpage, getWorkpageContainer, isOpenedAsPopup, isPopupHeaderRendered, onMaximize, onMoveWorkpageIntoContentArea, prepareObject, registerWorkplaceInMultiWorkplaceScenario, setOwner, setWorkpage
Methods inherited from class org.eclnt.jsfserver.managedbean.DefaultDispatcher
addDispatcherExtension, checkIfDispatchedBeanIsLoaded, checkIfDispatchedBeanIsLoaded, createProcessPreview, createSubDispatcherIndex, createSubDispatcherInstance, get, getChildDispatchers, getContentReplace, getDispatchedBean, getDispatchedBean, getExpressionBase, getMyExpression, getMyExpression, getRootExpression, getStaticDispatcherInfo, initDispatcher, initRegisteredBeanInfos, initRegisteredPackages, isDestroyed, outputLogInfoWhenNoClassWasResolved, registerSubDispatcherInstance, removeDispatchedBean, removeDispatchedBean, removeDispatcherExtension, resolveClass, toString, unregisterSubDispatcherInstance, updateExpression
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclnt.jsfserver.managedbean.IDispatcher
checkIfDispatchedBeanIsLoaded, checkIfDispatchedBeanIsLoaded, createSubDispatcherIndex, createSubDispatcherInstance, getChildDispatchers, getContentReplace, getDispatchedBean, getDispatchedBean, getExpressionBase, getMyExpression, getMyExpression, removeDispatchedBean, removeDispatchedBean, unregisterSubDispatcherInstance, updateExpression
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Field Details
-
m_springContext
protected org.springframework.context.support.AbstractApplicationContext m_springContext
-
-
Constructor Details
-
DispatcherByAnnotationSpringAccess
public DispatcherByAnnotationSpringAccess()Constructor for the root dispatcher within the dialog session. -
DispatcherByAnnotationSpringAccess
public DispatcherByAnnotationSpringAccess(org.eclnt.workplace.IWorkpageContainer workpageContainer) Constructor for the sub dispatchers - if using the CaptainCasa Workplace management.
-
-
Method Details
-
initializeIgnoreSpringInitializationErrors
public static void initializeIgnoreSpringInitializationErrors(boolean value) If there are problems creating the Spring context then by default an Error is thrown during initialization. If this should be avoided then you may set this value to "false". This typically makes sense if you want to use this class both in Spring scenarios and in no-Spring scenarios. -
initializeResolveBeanWithLowerCaseKey
public static void initializeResolveBeanWithLowerCaseKey(boolean value) When accessing beans from the spring context then the value of the expression is directly used. Example: if the expression is "#{d.XyzUI.*}" then the key which is used for accessing the spring context is "XyzUI".
If defining "false" as parameter of this method, then the resolving stops when not having found a corresponding bean in the spring context.
If passing "true" as parameter of this method, then after using "XyzUI" also the lower case variant "xyzUI" is used.
Default is "true". -
getSpringContext
public org.springframework.context.support.AbstractApplicationContext getSpringContext()The spring context that is used for resolving dispatched beans. This is a context which is managed per dialog session and which is a child of the normal Spring application context. -
readObject
- Overrides:
readObject
in classorg.eclnt.jsfserver.managedbean.DefaultDispatcher
- Throws:
Exception
-
createSpringContext
protected org.springframework.context.support.AbstractApplicationContext createSpringContext()Creation of spring context. By default usesDialogSessionApplicationContextFactoryBase
for creating the spring context. -
findContextFactory
-
findBasePackages
-