Class PrototypeBeanContextItemProvider
- java.lang.Object
-
- com.atlassian.confluence.setup.velocity.PrototypeBeanContextItemProvider
-
- All Implemented Interfaces:
VelocityContextItemProvider
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
public final class PrototypeBeanContextItemProvider extends Object implements VelocityContextItemProvider, org.springframework.context.ApplicationContextAware
Looks up the named bean each time in the application context before setting it in the Velocity context. This is suitable for use with prototype beans that change based on the user, like "i18n" and "jsonator".
-
-
Constructor Summary
Constructors Constructor Description PrototypeBeanContextItemProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getContextMap()
void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
void
setContextKeyToBeanNameMapping(Map<String,String> contextKeyToBeanName)
-
-
-
Method Detail
-
getContextMap
public Map<String,Object> getContextMap()
- Specified by:
getContextMap
in interfaceVelocityContextItemProvider
- Returns:
- A map of values to be used within a Velocity
Context
. Must not be null
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
-