com.xpn.xwiki.render
Class DefaultVelocityManager

java.lang.Object
  extended by com.xpn.xwiki.render.DefaultVelocityManager
All Implemented Interfaces:
VelocityManager

@Component
@Singleton
public class DefaultVelocityManager
extends Object
implements VelocityManager

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: 42d391b67b33f75b2addd72345321483267301e1 $

Constructor Summary
DefaultVelocityManager()
           
 
Method Summary
 org.apache.velocity.VelocityContext getVelocityContext()
           
 VelocityEngine getVelocityEngine()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultVelocityManager

public DefaultVelocityManager()
Method Detail

getVelocityContext

public org.apache.velocity.VelocityContext getVelocityContext()
Specified by:
getVelocityContext in interface VelocityManager

getVelocityEngine

public VelocityEngine getVelocityEngine()
                                 throws XWikiVelocityException
Specified by:
getVelocityEngine in interface 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:
XWikiVelocityException - in case of an error while creating a Velocity Engine


Copyright © 2004–2014 XWiki. All rights reserved.