org.codehaus.waffle.action
Class HierarchicalArgumentResolver

java.lang.Object
  extended by org.codehaus.waffle.action.HierarchicalArgumentResolver
All Implemented Interfaces:
ArgumentResolver

public class HierarchicalArgumentResolver
extends java.lang.Object
implements ArgumentResolver

Hierarchical implementation attempts to resolve the arguments value through the following ordered scoped (returning the first not null value found):

  1. 1. PARAMETER
  2. 2. REQUEST attribute
  3. 3. SESSION attribute
  4. 4. APPLICATION attribute
If none are found, returns null

Author:
Michael Ward, Mauro Talevi

Nested Class Summary
static class HierarchicalArgumentResolver.Scope
           
 
Constructor Summary
HierarchicalArgumentResolver(javax.servlet.ServletContext servletContext, ActionMonitor actionMonitor)
           
 
Method Summary
 java.lang.Object resolve(javax.servlet.http.HttpServletRequest request, java.lang.String name)
          Find the associated value for the argument name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HierarchicalArgumentResolver

public HierarchicalArgumentResolver(javax.servlet.ServletContext servletContext,
                                    ActionMonitor actionMonitor)
Method Detail

resolve

public java.lang.Object resolve(javax.servlet.http.HttpServletRequest request,
                                java.lang.String name)
Description copied from interface: ArgumentResolver
Find the associated value for the argument name

Specified by:
resolve in interface ArgumentResolver
Parameters:
request - is the current request
name - the name of the argument being resolved
Returns:
the arguments resolved value, or null if not resolved


Copyright © 2008. All Rights Reserved.