Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tonbeller.wcf.param
Class SessionParamPool

    java.lang.Object
      com.tonbeller.wcf.param.SessionParamPool

All Implemented Interfaces:
  java.util.Map

public class SessionParamPool
extends java.lang.Object
implements java.util.Map

A pool that contains all `SessionParam` instances of a session. JSPs, SQL Queries and MDX Queries may fetch parameter values that they need for display or computation.

Parameters may be accessed from a JSP with JSTL scripting, for example

       Selected Customer: <c:out value="${paramPool.myParam.displayValue}"/>

Parameters may be accessed in a JSTL SQL tag like

       <sql:query>
         ...
         <wcf:sqlParam name="..."/>
         ...
       </sql:query>

Parameters may be used in MDX Queries like

       <jp:mondrianQuery>
         ...
         <jp:mondrianParam name="..."/>
       </jp:mondrianQuery>

A SessionParamPool creates two session variables

- `paramPool` the SessionParamPool instance that contains SessionParam's
- `sqlValueMap` a map view to the SessionParamPool that contains the parameters name and their sql values

Author:
  av

Nested Class Summary

Nested classes inherited from class java.util.Map
`java.util.Map.Entry`

Constructor Summary
`protected` | `SessionParamPool()`

Method Summary
`void` | `clear()`
`boolean` | `containsKey(java.lang.Object key)`
`boolean` | `containsValue(java.lang.Object value)`
`protected static SessionParamPool` | `createInstance()` creates a new SessionParamPool instance
`java.util.Set` | `entrySet()`
`java.lang.Object` | `get(java.lang.Object key)`
`SessionParam` | `getParam(java.lang.String name)`
`java.util.Map` | `getSqlValueMap()` returns a map that maps parameter names to their sql values.
`static SessionParamPool` | `instance(javax.servlet.http.HttpSession session)` finds or creates the SessionParamPool
`static SessionParamPool` | `instance(javax.servlet.jsp.PageContext pageContext)` finds or creates the SessionParamPool
`boolean` | `isEmpty()`
`java.util.Set` | `keySet()`
`void` | `popParams(java.util.Map memento)` restores the state of the pool that was modified by pushParams
`java.util.Map` | `pushParams(java.util.Collection c)` stores all SessionParam objects of c into the pool.
`java.lang.Object` | `put(java.lang.Object key, java.lang.Object value)`
`void` | `putAll(java.util.Map t)`
`java.lang.Object` | `remove(java.lang.Object key)`
`void` | `removeParam(SessionParam p)`
`SessionParam` | `removeParam(java.lang.String name)`
`SessionParam` | `setParam(SessionParam p)`
`int` | `size()`
`java.util.Collection` | `values()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Constructor Detail

### SessionParamPool

    protected SessionParamPool()

Method Detail

### instance

    public static SessionParamPool instance(javax.servlet.http.HttpSession session)

  finds or creates the SessionParamPool

### createInstance

    protected static SessionParamPool createInstance()

  creates a new SessionParamPool instance

### instance

    public static SessionParamPool instance(javax.servlet.jsp.PageContext pageContext)

  finds or creates the SessionParamPool

### getParam

    public SessionParam getParam(java.lang.String name)

### setParam

    public SessionParam setParam(SessionParam p)

### pushParams

    public java.util.Map pushParams(java.util.Collection c)

  stores all SessionParam objects of c into the pool. Returns a Map that contains the previous value (or null) for the modified parameter names.

  See Also:
    `popParams(Map)`

### popParams

    public void popParams(java.util.Map memento)

  restores the state of the pool that was modified by pushParams

  See Also:
    `pushParams(Collection)`

### removeParam

    public void removeParam(SessionParam p)

### removeParam

    public SessionParam removeParam(java.lang.String name)

### getSqlValueMap

    public java.util.Map getSqlValueMap()

  returns a map that maps parameter names to their sql values.

### size

    public int size()

  Specified by:
    `size` in interface `java.util.Map`

### clear

    public void clear()

  Specified by:
    `clear` in interface `java.util.Map`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `java.util.Map`

### containsKey

    public boolean containsKey(java.lang.Object key)

  Specified by:
    `containsKey` in interface `java.util.Map`

### containsValue

    public boolean containsValue(java.lang.Object value)

  Specified by:
    `containsValue` in interface `java.util.Map`

### values

    public java.util.Collection values()

  Specified by:
    `values` in interface `java.util.Map`

### putAll

    public void putAll(java.util.Map t)

  Specified by:
    `putAll` in interface `java.util.Map`

### entrySet

    public java.util.Set entrySet()

  Specified by:
    `entrySet` in interface `java.util.Map`

### keySet

    public java.util.Set keySet()

  Specified by:
    `keySet` in interface `java.util.Map`

### get

    public java.lang.Object get(java.lang.Object key)

  Specified by:
    `get` in interface `java.util.Map`

### remove

    public java.lang.Object remove(java.lang.Object key)

  Specified by:
    `remove` in interface `java.util.Map`

### put

    public java.lang.Object put(java.lang.Object key,
                                java.lang.Object value)

  Specified by:
    `put` in interface `java.util.Map`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD