com.atlassian.jira.util.velocity
Class HttpSessionBackedVelocityRequestSession

java.lang.Object
  extended by com.atlassian.jira.util.velocity.HttpSessionBackedVelocityRequestSession
All Implemented Interfaces:
VelocityRequestSession

public class HttpSessionBackedVelocityRequestSession
extends Object
implements VelocityRequestSession

An implementation of the VelocityRequestSession that is backed by a HttpSession All methods are a direct call through to the underlying HttpSession. This will only create the request if necessary.

Since:
v4.0

Constructor Summary
HttpSessionBackedVelocityRequestSession(javax.servlet.http.HttpServletRequest request)
           
 
Method Summary
 Object getAttribute(String s)
          Returns the object bound with the specified name in this session, or null if no object is bound under the name.
 Enumeration<String> getAttributeNames()
          Returns an Enumeration of String objects containing the names of all the objects bound to this session.
 String getId()
          Returns a string containing the unique identifier assigned to this session.
 void invalidate()
          Invalidates this session and unbinds any objects bound to it.
 void removeAttribute(String s)
          Removes the object bound with the specified name from this session.
 void setAttribute(String s, Object o)
          Binds an object to this session, using the name specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpSessionBackedVelocityRequestSession

public HttpSessionBackedVelocityRequestSession(javax.servlet.http.HttpServletRequest request)
Method Detail

getId

public String getId()
Description copied from interface: VelocityRequestSession
Returns a string containing the unique identifier assigned to this session.

Specified by:
getId in interface VelocityRequestSession
Returns:
a string specifying the identifier assigned to this session

getAttribute

public Object getAttribute(String s)
Description copied from interface: VelocityRequestSession
Returns the object bound with the specified name in this session, or null if no object is bound under the name.

Specified by:
getAttribute in interface VelocityRequestSession
Parameters:
s - a string specifying the name of the object
Returns:
the object with the specified name

getAttributeNames

public Enumeration<String> getAttributeNames()
Description copied from interface: VelocityRequestSession
Returns an Enumeration of String objects containing the names of all the objects bound to this session.

Specified by:
getAttributeNames in interface VelocityRequestSession
Returns:
an Enumeration of String objects specifying the names of all the objects bound to this session

setAttribute

public void setAttribute(String s,
                         Object o)
Description copied from interface: VelocityRequestSession
Binds an object to this session, using the name specified. If an object of the same name is already bound to the session, the object is replaced.

Specified by:
setAttribute in interface VelocityRequestSession
Parameters:
s - the name to which the object is bound; cannot be null
o - the object to be bound; cannot be null

removeAttribute

public void removeAttribute(String s)
Description copied from interface: VelocityRequestSession
Removes the object bound with the specified name from this session. If the session does not have an object bound with the specified name, this method does nothing.

Specified by:
removeAttribute in interface VelocityRequestSession
Parameters:
s - the name of the object to remove from this session

invalidate

public void invalidate()
Description copied from interface: VelocityRequestSession
Invalidates this session and unbinds any objects bound to it.

Specified by:
invalidate in interface VelocityRequestSession


Copyright © 2002-2014 Atlassian. All Rights Reserved.