Class DefaultVelocityRequestContextFactory

java.lang.Object
com.atlassian.jira.util.velocity.DefaultVelocityRequestContextFactory
All Implemented Interfaces:
VelocityRequestContextFactory

public class DefaultVelocityRequestContextFactory extends Object implements VelocityRequestContextFactory
Return an instance of VelocityRequestContext, depending on whether we are called from a web or non-web context.

The original intention of this class is to get around bugs such as JRA-11038, where velocity fragments are called from both web and non-web contexts. Originally we tried to proxy HttpServletRequest, but it makes more sense to have a specific interface VelocityRequestContext.