blob: 1f3dc7b6cd6f24af7b86faa775afafe822ef1a00 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_92) on Tue Jul 05 10:55:36 EDT 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PathMatchingFilter (Apache Shiro 1.2.6 API)</title>
<meta name="date" content="2016-07-05">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="PathMatchingFilter (Apache Shiro 1.2.6 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PathMatchingFilter.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/shiro/web/filter/PathConfigProcessor.html" title="interface in org.apache.shiro.web.filter"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/shiro/web/filter/PathMatchingFilter.html" target="_top">Frames</a></li>
<li><a href="PathMatchingFilter.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.shiro.web.filter</div>
<h2 title="Class PathMatchingFilter" class="title">Class PathMatchingFilter</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.ServletContextSupport</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.AbstractFilter</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/shiro/web/servlet/NameableFilter.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.NameableFilter</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.OncePerRequestFilter</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html" title="class in org.apache.shiro.web.servlet">org.apache.shiro.web.servlet.AdviceFilter</a></li>
<li>
<ul class="inheritance">
<li>org.apache.shiro.web.filter.PathMatchingFilter</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</a>, <a href="../../../../../org/apache/shiro/util/Nameable.html" title="interface in org.apache.shiro.util">Nameable</a>, <a href="../../../../../org/apache/shiro/web/filter/PathConfigProcessor.html" title="interface in org.apache.shiro.web.filter">PathConfigProcessor</a></dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../../org/apache/shiro/web/filter/AccessControlFilter.html" title="class in org.apache.shiro.web.filter">AccessControlFilter</a>, <a href="../../../../../org/apache/shiro/web/filter/authc/AnonymousFilter.html" title="class in org.apache.shiro.web.filter.authc">AnonymousFilter</a>, <a href="../../../../../org/apache/shiro/web/filter/session/NoSessionCreationFilter.html" title="class in org.apache.shiro.web.filter.session">NoSessionCreationFilter</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.42">PathMatchingFilter</a>
extends <a href="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html" title="class in org.apache.shiro.web.servlet">AdviceFilter</a>
implements <a href="../../../../../org/apache/shiro/web/filter/PathConfigProcessor.html" title="interface in org.apache.shiro.web.filter">PathConfigProcessor</a></pre>
<div class="block"><p>Base class for Filters that will process only specified paths and allow all others to pass through.</p></div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>0.9</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#appliedPaths">appliedPaths</a></span></code>
<div class="block">A collection of path-to-config entries where the key is a path which this filter should process and
the value is the (possibly null) configuration element specific to this Filter for that specific path.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/apache/shiro/util/PatternMatcher.html" title="interface in org.apache.shiro.util">PatternMatcher</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#pathMatcher">pathMatcher</a></span></code>
<div class="block">PatternMatcher used in determining which paths to react to for a given request.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.shiro.web.servlet.OncePerRequestFilter">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html" title="class in org.apache.shiro.web.servlet">OncePerRequestFilter</a></h3>
<code><a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#ALREADY_FILTERED_SUFFIX">ALREADY_FILTERED_SUFFIX</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.shiro.web.servlet.AbstractFilter">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html" title="class in org.apache.shiro.web.servlet">AbstractFilter</a></h3>
<code><a href="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#filterConfig">filterConfig</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#PathMatchingFilter--">PathMatchingFilter</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>protected <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#getPathWithinApplication-javax.servlet.ServletRequest-">getPathWithinApplication</a></span>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</code>
<div class="block">Returns the context path within the application based on the specified <code>request</code>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#isEnabled-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.String-java.lang.Object-">isEnabled</a></span>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;mappedValue)</code>
<div class="block">Path-matching version of the parent class's
<a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled-javax.servlet.ServletRequest-javax.servlet.ServletResponse-"><code>OncePerRequestFilter.isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</code></a> method, but additionally allows
for inspection of any path-specific configuration values corresponding to the specified request.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#onPreHandle-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.Object-">onPreHandle</a></span>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;mappedValue)</code>
<div class="block">This default implementation always returns <code>true</code> and should be overridden by subclasses for custom
logic if necessary.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#pathsMatch-java.lang.String-javax.servlet.ServletRequest-">pathsMatch</a></span>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</code>
<div class="block">Returns <code>true</code> if the incoming <code>request</code> matches the specified <code>path</code> pattern,
<code>false</code> otherwise.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#pathsMatch-java.lang.String-java.lang.String-">pathsMatch</a></span>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pattern,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path)</code>
<div class="block">Returns <code>true</code> if the <code>path</code> matches the specified <code>pattern</code> string,
<code>false</code> otherwise.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#preHandle-javax.servlet.ServletRequest-javax.servlet.ServletResponse-">preHandle</a></span>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response)</code>
<div class="block">Implementation that handles path-matching behavior before a request is evaluated.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#processPathConfig-java.lang.String-java.lang.String-">processPathConfig</a></span>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;config)</code>
<div class="block">Splits any comma-delmited values that might be found in the <code>config</code> argument and sets the resulting
<code>String[]</code> array on the <code>appliedPaths</code> internal Map.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.shiro.web.servlet.AdviceFilter">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html" title="class in org.apache.shiro.web.servlet">AdviceFilter</a></h3>
<code><a href="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#afterCompletion-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.Exception-">afterCompletion</a>, <a href="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#cleanup-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.Exception-">cleanup</a>, <a href="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#doFilterInternal-javax.servlet.ServletRequest-javax.servlet.ServletResponse-javax.servlet.FilterChain-">doFilterInternal</a>, <a href="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#executeChain-javax.servlet.ServletRequest-javax.servlet.ServletResponse-javax.servlet.FilterChain-">executeChain</a>, <a href="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#postHandle-javax.servlet.ServletRequest-javax.servlet.ServletResponse-">postHandle</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.shiro.web.servlet.OncePerRequestFilter">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html" title="class in org.apache.shiro.web.servlet">OncePerRequestFilter</a></h3>
<code><a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#doFilter-javax.servlet.ServletRequest-javax.servlet.ServletResponse-javax.servlet.FilterChain-">doFilter</a>, <a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#getAlreadyFilteredAttributeName--">getAlreadyFilteredAttributeName</a>, <a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled--">isEnabled</a>, <a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled-javax.servlet.ServletRequest-javax.servlet.ServletResponse-">isEnabled</a>, <a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#setEnabled-boolean-">setEnabled</a>, <a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#shouldNotFilter-javax.servlet.ServletRequest-">shouldNotFilter</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.shiro.web.servlet.NameableFilter">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../../../../../org/apache/shiro/web/servlet/NameableFilter.html" title="class in org.apache.shiro.web.servlet">NameableFilter</a></h3>
<code><a href="../../../../../org/apache/shiro/web/servlet/NameableFilter.html#getName--">getName</a>, <a href="../../../../../org/apache/shiro/web/servlet/NameableFilter.html#setName-java.lang.String-">setName</a>, <a href="../../../../../org/apache/shiro/web/servlet/NameableFilter.html#toStringBuilder--">toStringBuilder</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.shiro.web.servlet.AbstractFilter">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html" title="class in org.apache.shiro.web.servlet">AbstractFilter</a></h3>
<code><a href="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#destroy--">destroy</a>, <a href="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#getFilterConfig--">getFilterConfig</a>, <a href="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#getInitParam-java.lang.String-">getInitParam</a>, <a href="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#init-javax.servlet.FilterConfig-">init</a>, <a href="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#onFilterConfigSet--">onFilterConfigSet</a>, <a href="../../../../../org/apache/shiro/web/servlet/AbstractFilter.html#setFilterConfig-javax.servlet.FilterConfig-">setFilterConfig</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.shiro.web.servlet.ServletContextSupport">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.shiro.web.servlet.<a href="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html" title="class in org.apache.shiro.web.servlet">ServletContextSupport</a></h3>
<code><a href="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#getContextAttribute-java.lang.String-">getContextAttribute</a>, <a href="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#getContextInitParam-java.lang.String-">getContextInitParam</a>, <a href="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#getServletContext--">getServletContext</a>, <a href="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#removeContextAttribute-java.lang.String-">removeContextAttribute</a>, <a href="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#setContextAttribute-java.lang.String-java.lang.Object-">setContextAttribute</a>, <a href="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#setServletContext-javax.servlet.ServletContext-">setServletContext</a>, <a href="../../../../../org/apache/shiro/web/servlet/ServletContextSupport.html#toString--">toString</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="pathMatcher">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pathMatcher</h4>
<pre>protected&nbsp;<a href="../../../../../org/apache/shiro/util/PatternMatcher.html" title="interface in org.apache.shiro.util">PatternMatcher</a> <a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.52">pathMatcher</a></pre>
<div class="block">PatternMatcher used in determining which paths to react to for a given request.</div>
</li>
</ul>
<a name="appliedPaths">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>appliedPaths</h4>
<pre>protected&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a>&lt;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&gt; <a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.62">appliedPaths</a></pre>
<div class="block">A collection of path-to-config entries where the key is a path which this filter should process and
the value is the (possibly null) configuration element specific to this Filter for that specific path.
<p/>
<p>To put it another way, the keys are the paths (urls) that this Filter will process.
<p>The values are filter-specific data that this Filter should use when processing the corresponding
key (path). The values can be null if no Filter-specific config was specified for that url.</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="PathMatchingFilter--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>PathMatchingFilter</h4>
<pre>public&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.42">PathMatchingFilter</a>()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="processPathConfig-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>processPathConfig</h4>
<pre>public&nbsp;<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/Filter.html?is-external=true" title="class or interface in javax.servlet">Filter</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.82">processPathConfig</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;config)</pre>
<div class="block">Splits any comma-delmited values that might be found in the <code>config</code> argument and sets the resulting
<code>String[]</code> array on the <code>appliedPaths</code> internal Map.
<p/>
That is:
<pre><code>
String[] values = null;
if (config != null) {
values = split(config);
}
<p/>
this.<a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#appliedPaths"><code>appliedPaths</code></a>.put(path, values);
</code></pre></div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../../org/apache/shiro/web/filter/PathConfigProcessor.html#processPathConfig-java.lang.String-java.lang.String-">processPathConfig</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../../org/apache/shiro/web/filter/PathConfigProcessor.html" title="interface in org.apache.shiro.web.filter">PathConfigProcessor</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>path</code> - the application context path to match for executing this filter.</dd>
<dd><code>config</code> - the specified for <em>this particular filter only</em> for the given <code>path</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this configured filter.</dd>
</dl>
</li>
</ul>
<a name="getPathWithinApplication-javax.servlet.ServletRequest-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPathWithinApplication</h4>
<pre>protected&nbsp;<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.102">getPathWithinApplication</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</pre>
<div class="block">Returns the context path within the application based on the specified <code>request</code>.
<p/>
This implementation merely delegates to
<a href="../../../../../org/apache/shiro/web/util/WebUtils.html#getPathWithinApplication-javax.servlet.http.HttpServletRequest-"><code>WebUtils.getPathWithinApplication(request)</code></a>,
but can be overridden by subclasses for custom logic.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - the incoming <code>ServletRequest</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the context path within the application.</dd>
</dl>
</li>
</ul>
<a name="pathsMatch-java.lang.String-javax.servlet.ServletRequest-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pathsMatch</h4>
<pre>protected&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.121">pathsMatch</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request)</pre>
<div class="block">Returns <code>true</code> if the incoming <code>request</code> matches the specified <code>path</code> pattern,
<code>false</code> otherwise.
<p/>
The default implementation acquires the <code>request</code>'s path within the application and determines
if that matches:
<p/>
<code>String requestURI = <a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#getPathWithinApplication-javax.servlet.ServletRequest-"><code>getPathWithinApplication(request)</code></a>;<br/>
return <a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#pathsMatch-java.lang.String-java.lang.String-"><code>pathsMatch(path,requestURI)</code></a></code></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>path</code> - the configured url pattern to check the incoming request against.</dd>
<dd><code>request</code> - the incoming ServletRequest</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the incoming <code>request</code> matches the specified <code>path</code> pattern,
<code>false</code> otherwise.</dd>
</dl>
</li>
</ul>
<a name="pathsMatch-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>pathsMatch</h4>
<pre>protected&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.140">pathsMatch</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;pattern,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path)</pre>
<div class="block">Returns <code>true</code> if the <code>path</code> matches the specified <code>pattern</code> string,
<code>false</code> otherwise.
<p/>
Simply delegates to
<b><code>this.pathMatcher.<a href="../../../../../org/apache/shiro/util/PatternMatcher.html#matches-java.lang.String-java.lang.String-"><code>matches(pattern,path)</code></a></code></b>,
but can be overridden by subclasses for custom matching behavior.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>pattern</code> - the pattern to match against</dd>
<dd><code>path</code> - the value to match with the specified <code>pattern</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the <code>path</code> matches the specified <code>pattern</code> string,
<code>false</code> otherwise.</dd>
</dl>
</li>
</ul>
<a name="preHandle-javax.servlet.ServletRequest-javax.servlet.ServletResponse-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>preHandle</h4>
<pre>protected&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.163">preHandle</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response)
throws <a href="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">Implementation that handles path-matching behavior before a request is evaluated. If the path matches and
the filter
<a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#isEnabled-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.String-java.lang.Object-"><code>isEnabled</code></a> for
that path/config, the request will be allowed through via the result from
<a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#onPreHandle-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.Object-"><code>onPreHandle</code></a>. If the
path does not match or the filter is not enabled for that path, this filter will allow passthrough immediately
to allow the <code>FilterChain</code> to continue executing.
<p/>
In order to retain path-matching functionality, subclasses should not override this method if at all
possible, and instead override
<a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#onPreHandle-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.Object-"><code>onPreHandle</code></a> instead.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html#preHandle-javax.servlet.ServletRequest-javax.servlet.ServletResponse-">preHandle</a></code>&nbsp;in class&nbsp;<code><a href="../../../../../org/apache/shiro/web/servlet/AdviceFilter.html" title="class in org.apache.shiro.web.servlet">AdviceFilter</a></code></dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - the incoming ServletRequest</dd>
<dd><code>response</code> - the outgoing ServletResponse</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the filter chain is allowed to continue to execute, <code>false</code> if a subclass has
handled the request explicitly.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - if an error occurs</dd>
</dl>
</li>
</ul>
<a name="onPreHandle-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>onPreHandle</h4>
<pre>protected&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.229">onPreHandle</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;mappedValue)
throws <a href="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">This default implementation always returns <code>true</code> and should be overridden by subclasses for custom
logic if necessary.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - the incoming ServletRequest</dd>
<dd><code>response</code> - the outgoing ServletResponse</dd>
<dd><code>mappedValue</code> - the filter-specific config value mapped to this filter in the URL rules mappings.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if the request should be able to continue, <code>false</code> if the filter will
handle the response directly.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - if an error occurs</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/apache/shiro/web/filter/PathMatchingFilter.html#isEnabled-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.String-java.lang.Object-"><code>isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse, String, Object)</code></a></dd>
</dl>
</li>
</ul>
<a name="isEnabled-javax.servlet.ServletRequest-javax.servlet.ServletResponse-java.lang.String-java.lang.Object-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isEnabled</h4>
<pre>protected&nbsp;boolean&nbsp;<a href="../../../../../src-html/org/apache/shiro/web/filter/PathMatchingFilter.html#line.254">isEnabled</a>(<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html?is-external=true" title="class or interface in javax.servlet">ServletRequest</a>&nbsp;request,
<a href="http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletResponse.html?is-external=true" title="class or interface in javax.servlet">ServletResponse</a>&nbsp;response,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;path,
<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;mappedValue)
throws <a href="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></pre>
<div class="block">Path-matching version of the parent class's
<a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled-javax.servlet.ServletRequest-javax.servlet.ServletResponse-"><code>OncePerRequestFilter.isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</code></a> method, but additionally allows
for inspection of any path-specific configuration values corresponding to the specified request. Subclasses
may wish to inspect this additional mapped configuration to determine if the filter is enabled or not.
<p/>
This method's default implementation ignores the <code>path</code> and <code>mappedValue</code> arguments and merely
returns the value from a call to <a href="../../../../../org/apache/shiro/web/servlet/OncePerRequestFilter.html#isEnabled-javax.servlet.ServletRequest-javax.servlet.ServletResponse-"><code>OncePerRequestFilter.isEnabled(javax.servlet.ServletRequest, javax.servlet.ServletResponse)</code></a>.
It is expected that subclasses override this method if they need to perform enable/disable logic for a specific
request based on any path-specific config for the filter instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>request</code> - the incoming servlet request</dd>
<dd><code>response</code> - the outbound servlet response</dd>
<dd><code>path</code> - the path matched for the incoming servlet request that has been configured with the given <code>mappedValue</code>.</dd>
<dd><code>mappedValue</code> - the filter-specific config value mapped to this filter in the URL rules mappings for the given <code>path</code>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd><code>true</code> if this filter should filter the specified request, <code>false</code> if it should let the
request/response pass through immediately to the next element in the <code>FilterChain</code>.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a></code> - in the case of any error</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/PathMatchingFilter.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/shiro/web/filter/PathConfigProcessor.html" title="interface in org.apache.shiro.web.filter"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/shiro/web/filter/PathMatchingFilter.html" target="_top">Frames</a></li>
<li><a href="PathMatchingFilter.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2004-2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p>
</body>
</html>