com.atlassian.confluence.setup.velocity
Class PrototypeBeanContextItemProvider

java.lang.Object
  extended by com.atlassian.confluence.setup.velocity.PrototypeBeanContextItemProvider
All Implemented Interfaces:
VelocityContextItemProvider, 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
PrototypeBeanContextItemProvider()
           
 
Method Summary
 Map<String,Object> getContextMap()
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setContextKeyToBeanNameMapping(Map<String,String> contextKeyToBeanName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrototypeBeanContextItemProvider

public PrototypeBeanContextItemProvider()
Method Detail

getContextMap

public Map<String,Object> getContextMap()
Specified by:
getContextMap in interface VelocityContextItemProvider
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 interface org.springframework.context.ApplicationContextAware
Throws:
org.springframework.beans.BeansException

setContextKeyToBeanNameMapping

public void setContextKeyToBeanNameMapping(Map<String,String> contextKeyToBeanName)


Copyright © 2003-2013 Atlassian. All Rights Reserved.