Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.server.security.extender
Class DelegatingContextPathUrlMatcher

java.lang.Object
  extended by eu.esdihumboldt.hale.server.security.extender.DelegatingContextPathUrlMatcher
All Implemented Interfaces:
org.springframework.security.web.util.RequestMatcher

public class DelegatingContextPathUrlMatcher
extends Object
implements org.springframework.security.web.util.RequestMatcher

A RequestMatcher that is also aware of the current context path and is able to use it for matching. After evaluating the context path this matcher delegates the call to another request matcher.

Context paths begin with a double slash and end with a single one. For example

 //hale/version
 
yields to the URL /version in the context path /hale.

Currently, this class only handles delegates of type AntPathRequestMatcher and RegexRequestMatcher, because these are the only ones that match against the servlet path. All others currently implemented in Spring match against some other attribute (such as IP address for example).

Author:
Michel Kraemer

Method Summary
 boolean matches(javax.servlet.http.HttpServletRequest request)
           
static org.springframework.security.web.util.RequestMatcher wrapIfNecessary(org.springframework.security.web.util.RequestMatcher delegate, org.springframework.web.context.WebApplicationContext ctx)
          Checks if this class should be used to intercept calls to the given request matcher and if so returns the wrapped object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

wrapIfNecessary

public static org.springframework.security.web.util.RequestMatcher wrapIfNecessary(org.springframework.security.web.util.RequestMatcher delegate,
                                                                                   org.springframework.web.context.WebApplicationContext ctx)
Checks if this class should be used to intercept calls to the given request matcher and if so returns the wrapped object. Otherwise returns the original object.

Parameters:
delegate - the request matcher to wrap
ctx - the current web application context
Returns:
a new request matcher if this class supports the given one and if calls to it should be intercepted, the original request matcher otherwise

matches

public boolean matches(javax.servlet.http.HttpServletRequest request)
Specified by:
matches in interface org.springframework.security.web.util.RequestMatcher

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d