public class

SimpleVelocityRequestContext

extends Object
implements VelocityRequestContext
java.lang.Object
   ↳ com.atlassian.jira.util.velocity.SimpleVelocityRequestContext

Class Overview

Default implementation

Summary

Public Constructors
SimpleVelocityRequestContext(String baseUrl)
SimpleVelocityRequestContext(String baseUrl, String canonicalBaseUrl, RequestContextParameterHolder requestContextParameterHolder, VelocityRequestSession session)
Public Methods
String getBaseUrl()
String getCanonicalBaseUrl()
String getRequestParameter(String name)
Convenience method to return the value from the requestParameter map stored with the name parameter.
RequestContextParameterHolder getRequestParameters()
Returns a RequestContextParameterHolder with various HttpServletRequest parameters.
VelocityRequestSession getSession()
Retrieve the VelocityRequestSession for the current user.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.util.velocity.VelocityRequestContext

Public Constructors

public SimpleVelocityRequestContext (String baseUrl)

public SimpleVelocityRequestContext (String baseUrl, String canonicalBaseUrl, RequestContextParameterHolder requestContextParameterHolder, VelocityRequestSession session)

Public Methods

public String getBaseUrl ()

See Also

public String getCanonicalBaseUrl ()

public String getRequestParameter (String name)

Convenience method to return the value from the requestParameter map stored with the name parameter.

Parameters
name parameter name
Returns
  • parameter value, or null

public RequestContextParameterHolder getRequestParameters ()

Returns a RequestContextParameterHolder with various HttpServletRequest parameters. This will be null if no HttpRequest is available.

Returns
  • Null if no HttpRequest is available. RequestContextParameterHolder with various parameters otherwise

public VelocityRequestSession getSession ()

Retrieve the VelocityRequestSession for the current user.

This will be null if you did not come in through a Http Request

Returns
  • null if no session is available