com.oroad.stxx.util
Class RequestAttributeSelector

java.lang.Object
  extended bycom.oroad.stxx.util.RequestAttributeSelector
All Implemented Interfaces:
Selector

public class RequestAttributeSelector
extends java.lang.Object
implements Selector

Tries to match the passed value with a given request attribute

Author:
Don Brown

Constructor Summary
RequestAttributeSelector()
           
 
Method Summary
 java.util.ArrayList findSelector(javax.servlet.http.HttpServletRequest request)
          Finds selectors matching the request
 void initialize(StxxProperties props)
          Initializes the selector from the properties
 boolean matches(java.lang.String value, javax.servlet.http.HttpServletRequest request)
          Determines if the value is a match or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestAttributeSelector

public RequestAttributeSelector()
Method Detail

initialize

public void initialize(StxxProperties props)
Initializes the selector from the properties

Specified by:
initialize in interface Selector
Parameters:
props - The stxx properties

findSelector

public java.util.ArrayList findSelector(javax.servlet.http.HttpServletRequest request)
Finds selectors matching the request

Specified by:
findSelector in interface Selector
Parameters:
request - The request object
Returns:
A list of found selector names

matches

public boolean matches(java.lang.String value,
                       javax.servlet.http.HttpServletRequest request)
Determines if the value is a match or not.

Specified by:
matches in interface Selector
Parameters:
value - The value to check
request - The request to match
Returns:
True if the values is a match