com.atlassian.jira.util.velocity
Interface VelocityRequestContext

All Known Implementing Classes:
SimpleVelocityRequestContext

public interface VelocityRequestContext

A context that allows for different implementations depending on whether it is running in the scope of a web request, or via email.

See Also:
DefaultVelocityRequestContextFactory

Method Summary
 java.lang.String getBaseUrl()
           
 java.lang.String getCanonicalBaseUrl()
           
 java.lang.String getRequestParameter(java.lang.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.
 

Method Detail

getBaseUrl

java.lang.String getBaseUrl()
Returns:
The base URL for this instance, also known as the context path. If running in the context of a web request, this will return a url relative to the server root (ie "/jira/"). If running via email, it will return an absolute URL (eg. "http://example.com/jira/").

getCanonicalBaseUrl

java.lang.String getCanonicalBaseUrl()
Returns:
The canonical base URL for this instance. It will return an absolute URL (eg. "http://example.com/jira/").

getRequestParameters

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

getRequestParameter

java.lang.String getRequestParameter(java.lang.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
Since:
v3.10

getSession

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


Copyright © 2002-2010 Atlassian. All Rights Reserved.