com.atlassian.jira.web.session
Class AbstractSessionSearchObjectManager<T>

java.lang.Object
  extended by com.atlassian.jira.web.session.AbstractSessionSearchObjectManager<T>
All Implemented Interfaces:
SessionSearchObjectManager<T>
Direct Known Subclasses:
DefaultSessionNextPreviousPagerManager, DefaultSessionPagerFilterManager, DefaultSessionSearchRequestManager, DefaultSessionSelectedIssueManager

@NonInjectableComponent
public abstract class AbstractSessionSearchObjectManager<T>
extends java.lang.Object
implements SessionSearchObjectManager<T>

A very basic implementation of SessionSearchObjectManager which only allows a single object to be set session-wide.

Developers note: to see our failed attempt at providing an object-per-window implementation, consult the SVN history.

Since:
v4.2

Nested Class Summary
static interface AbstractSessionSearchObjectManager.Session
          Simple interface for a wrapper of the various representations of Sessions we might use.
static class AbstractSessionSearchObjectManager.VelocityRequestSessionWrapper
           
 
Field Summary
protected  javax.servlet.http.HttpServletRequest request
           
protected  AbstractSessionSearchObjectManager.Session session
           
 
Constructor Summary
protected AbstractSessionSearchObjectManager(javax.servlet.http.HttpServletRequest request, AbstractSessionSearchObjectManager.Session session)
           
 
Method Summary
 T getCurrentObject()
           
protected abstract  java.lang.String getLastViewedSessionKey()
           
 void setCurrentObject(T object)
          Associates the specified object to the current user's session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

protected final javax.servlet.http.HttpServletRequest request

session

protected final AbstractSessionSearchObjectManager.Session session
Constructor Detail

AbstractSessionSearchObjectManager

protected AbstractSessionSearchObjectManager(javax.servlet.http.HttpServletRequest request,
                                             AbstractSessionSearchObjectManager.Session session)
Method Detail

getCurrentObject

public T getCurrentObject()
Specified by:
getCurrentObject in interface SessionSearchObjectManager<T>
Returns:
the current object for the current user session-wide. Null signifies that there is no current object.

setCurrentObject

public void setCurrentObject(T object)
Description copied from interface: SessionSearchObjectManager
Associates the specified object to the current user's session.

Specified by:
setCurrentObject in interface SessionSearchObjectManager<T>
Parameters:
object - the object

getLastViewedSessionKey

protected abstract java.lang.String getLastViewedSessionKey()
Returns:
the key which will be used to store the last viewed object in the session.


Copyright © 2002-2010 Atlassian. All Rights Reserved.