org.xwiki.velocity
Interface VelocityContextFactory


@ComponentRole
public interface VelocityContextFactory

Creates Velocity Context instances, pre-populated with the Velocity Tools enabled in the component's configuration, and by all the enabled VelocityContextInitializer components. The returned context is supposed to be used only once, as otherwise data may leak between different requests, and the parsing/rendering process would be affected by previous data.

Version:
$Id$

Method Summary
 org.apache.velocity.VelocityContext createContext()
          Creates and initializes a new Velocity Context.
 

Method Detail

createContext

org.apache.velocity.VelocityContext createContext()
                                                  throws XWikiVelocityException
Creates and initializes a new Velocity Context.

Returns:
a new Velocity Context, populated with Tools and data pushed by VelocityContextInitializers
Throws:
XWikiVelocityException - if the context failed to be created or initialized properly


Copyright © 2004-2011 XWiki. All Rights Reserved.