Package com.xpn.xwiki.render
Class DefaultVelocityManager
- java.lang.Object
-
- com.xpn.xwiki.render.DefaultVelocityManager
-
- All Implemented Interfaces:
org.xwiki.component.phase.Initializable,org.xwiki.velocity.VelocityManager
@Component @Singleton public class DefaultVelocityManager extends Object implements org.xwiki.velocity.VelocityManager, org.xwiki.component.phase.Initializable
Note: This class should be moved to the Velocity module. However this is not possible right now since we need to populate the Velocity Context with XWiki objects that are located in the Core (such as the XWiki object for example) and since the Core needs to call the Velocity module this would cause a circular dependency.- Since:
- 1.5M1
- Version:
- $Id: 701719218c3964232a484e6f5ec510072418ccc7 $
-
-
Constructor Summary
Constructors Constructor Description DefaultVelocityManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanevaluate(Writer out, String templateName, Reader source)org.apache.velocity.VelocityContextgetCurrentVelocityContext()org.apache.velocity.VelocityContextgetVelocityContext()org.xwiki.velocity.VelocityEnginegetVelocityEngine()voidinitialize()
-
-
-
Method Detail
-
initialize
public void initialize() throws org.xwiki.component.phase.InitializationException- Specified by:
initializein interfaceorg.xwiki.component.phase.Initializable- Throws:
org.xwiki.component.phase.InitializationException
-
getVelocityContext
public org.apache.velocity.VelocityContext getVelocityContext()
- Specified by:
getVelocityContextin interfaceorg.xwiki.velocity.VelocityManager
-
getCurrentVelocityContext
public org.apache.velocity.VelocityContext getCurrentVelocityContext()
- Specified by:
getCurrentVelocityContextin interfaceorg.xwiki.velocity.VelocityManager
-
getVelocityEngine
public org.xwiki.velocity.VelocityEngine getVelocityEngine() throws org.xwiki.velocity.XWikiVelocityException- Specified by:
getVelocityEnginein interfaceorg.xwiki.velocity.VelocityManager- Returns:
- the Velocity Engine corresponding to the current execution context. More specifically returns the Velocity Engine for the current skin since each skin has its own Velocity Engine so that each skin can have global velocimacros defined
- Throws:
org.xwiki.velocity.XWikiVelocityException- in case of an error while creating a Velocity Engine
-
-