Package org.xwiki.velocity
Interface VelocityContextFactory
-
@Role public interface VelocityContextFactory
Creates Velocity Context instances, pre-populated with the Velocity Tools enabled in the component's configuration, and by all the enabledVelocityContextInitializer
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: 72a848ed1163699603a64a35b6171e3c324f95d2 $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
VelocityContextInitializer
s - Throws:
XWikiVelocityException
- if the context failed to be created or initialized properly
-
-