velosurf.tools
Class HttpQueryTool

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--java.util.HashMap
              |
              +--velosurf.tools.HttpQueryTool
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable, org.apache.velocity.tools.view.tools.ViewTool

public class HttpQueryTool
extends java.util.HashMap
implements org.apache.velocity.tools.view.tools.ViewTool

This class has about the same functionnalities as the tool org.apache.velocity.tools.view.tools.ParameterParser but it adds a generic setter, and the autofetching feature.

Author:
Claude Brisson
See Also:
Serialized Form

Inner Class Summary
protected static class HttpQueryTool.AutoFetchInfos
           
 
Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
protected  javax.servlet.http.HttpServletRequest request
           
protected static boolean sAutofetchingEnabled
           
protected static java.util.Map sAutofetchMap
           
 
Fields inherited from class java.util.HashMap
count, emptyHashIterator, ENTRIES, entrySet, KEYS, keySet, loadFactor, modCount, serialVersionUID, table, threshold, values, VALUES
 
Constructor Summary
HttpQueryTool()
           
 
Method Summary
static void autofetch(Entity entity, java.lang.String param, java.lang.String name, boolean protect)
           
 boolean getBoolean(java.lang.String inKey)
           
 int getInt(java.lang.String inKey)
           
 int[] getInts(java.lang.String inKey)
           
 java.lang.String[] getStrings(java.lang.String inKey)
           
 java.lang.String getUri()
           
 void init(java.lang.Object inViewContext)
           
 
Methods inherited from class java.util.HashMap
, capacity, clear, clone, containsKey, containsValue, entrySet, get, getHashIterator, isEmpty, keySet, loadFactor, put, putAll, readObject, rehash, remove, size, values, writeObject
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

request

protected javax.servlet.http.HttpServletRequest request

sAutofetchingEnabled

protected static boolean sAutofetchingEnabled

sAutofetchMap

protected static java.util.Map sAutofetchMap
Constructor Detail

HttpQueryTool

public HttpQueryTool()
Method Detail

init

public void init(java.lang.Object inViewContext)
Specified by:
init in interface org.apache.velocity.tools.view.tools.ViewTool

getInt

public int getInt(java.lang.String inKey)

getBoolean

public boolean getBoolean(java.lang.String inKey)

getStrings

public java.lang.String[] getStrings(java.lang.String inKey)

getInts

public int[] getInts(java.lang.String inKey)

getUri

public java.lang.String getUri()

autofetch

public static void autofetch(Entity entity,
                             java.lang.String param,
                             java.lang.String name,
                             boolean protect)


ooOoo