org.enhydra.barracuda.plankton.data
Class ObjectRepository.SessionRepository

java.lang.Object
  extended byorg.enhydra.barracuda.plankton.data.DefaultStateMap
      extended byorg.enhydra.barracuda.plankton.data.ObjectRepository
          extended byorg.enhydra.barracuda.plankton.data.ObjectRepository.SessionRepository
All Implemented Interfaces:
StateMap
Enclosing class:
ObjectRepository

public static class ObjectRepository.SessionRepository
extends ObjectRepository

The basic idea behind this is that we want to wrap the session as a ObjectRepository object. In order to make this work, it's important that we don't actually cause the session to be instantiated unless absolutely necessary


Nested Class Summary
 
Nested classes inherited from class org.enhydra.barracuda.plankton.data.ObjectRepository
ObjectRepository.SessionRepository
 
Field Summary
 
Fields inherited from class org.enhydra.barracuda.plankton.data.ObjectRepository
custom, global, local, name, rawSessions, session, sessionIDs, softGlobal, softsession, weakGlobal, weaksession
 
Fields inherited from class org.enhydra.barracuda.plankton.data.DefaultStateMap
props
 
Constructor Summary
ObjectRepository.SessionRepository()
           
ObjectRepository.SessionRepository(javax.servlet.http.HttpServletRequest ireq)
           
ObjectRepository.SessionRepository(String iname)
           
 
Method Summary
 void clearState()
          clear all state information
 javax.servlet.http.HttpSession getSession()
           
 Object getState(Object key)
          get a property in this StateMap
 List getStateKeys()
          get a List of the keys for this StateMap (implementation is an ArrayList)
 Map getStateValues()
          get a copy of the underlying Map that holds the state values
 void putState(Object key, Object val)
          set a property in this StateMap
protected  void registerSession()
           
 Object removeState(Object key)
          remove a property in this StateMap.
 
Methods inherited from class org.enhydra.barracuda.plankton.data.ObjectRepository
getGlobalRepository, getLocalRepository, getName, getObjectRepository, getObjectRepository, getObjectRepositoryStore, getRawSession, getRawSessionStore, getSessionRepository, getSessionRepository, getSessionStore, getSoftGlobalRepository, getSoftSessionRepository, getWeakGlobalRepository, getWeakSessionRepository, invalidateAllSessions, invalidateSession, invalidateSession, printStackTrace, printStackTrace, printStackTrace, removeLocalRepository, removeObjectRepository, removeObjectRepository, removeSessionRepository, setupSessionRepository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectRepository.SessionRepository

public ObjectRepository.SessionRepository()

ObjectRepository.SessionRepository

public ObjectRepository.SessionRepository(String iname)

ObjectRepository.SessionRepository

public ObjectRepository.SessionRepository(javax.servlet.http.HttpServletRequest ireq)
Method Detail

registerSession

protected void registerSession()

putState

public void putState(Object key,
                     Object val)
Description copied from class: DefaultStateMap
set a property in this StateMap

Specified by:
putState in interface StateMap
Overrides:
putState in class DefaultStateMap
Parameters:
key - the key object
val - the value object

getState

public Object getState(Object key)
Description copied from class: DefaultStateMap
get a property in this StateMap

Specified by:
getState in interface StateMap
Overrides:
getState in class DefaultStateMap
Parameters:
key - the key object
Returns:
the value for the given key

removeState

public Object removeState(Object key)
Description copied from class: DefaultStateMap
remove a property in this StateMap. This function was expanded in csc_101803_2 to support the notion of wildcarding, allowing you to remove multiple keys in one fell swoop. Basically, if the key is a String, which ends with an '*', then any keys that start with that string will be removed (and in this case, the method returns a Map of key/val pairs that got removed, rather than a single object that got removed). This approach is not quite as flexible as using regular expressions, but that would make us dependent on jdk1.4 (so we won't go there for now). Note that this class backs the ObjectRepository data structures, so this functionality applies there as well.

Specified by:
removeState in interface StateMap
Overrides:
removeState in class DefaultStateMap
Parameters:
key - the key object
Returns:
the object which was removed

getStateKeys

public List getStateKeys()
Description copied from class: DefaultStateMap
get a List of the keys for this StateMap (implementation is an ArrayList)

Specified by:
getStateKeys in interface StateMap
Overrides:
getStateKeys in class DefaultStateMap
Returns:
a List the keys for this StateMap

getStateValues

public Map getStateValues()
Description copied from class: DefaultStateMap
get a copy of the underlying Map that holds the state values

Specified by:
getStateValues in interface StateMap
Overrides:
getStateValues in class DefaultStateMap
Returns:
a copy of the underlying state Map

clearState

public void clearState()
Description copied from class: DefaultStateMap
clear all state information

Specified by:
clearState in interface StateMap
Overrides:
clearState in class DefaultStateMap

getSession

public javax.servlet.http.HttpSession getSession()


Copyright © 2003 BarracudaMVC.org All Rights Reserved.