Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
ResourceMatcher |
|
| 1.0;1 |
1 | // Copyright 2004, 2005 The Apache Software Foundation |
|
2 | // |
|
3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
|
4 | // you may not use this file except in compliance with the License. |
|
5 | // You may obtain a copy of the License at |
|
6 | // |
|
7 | // http://www.apache.org/licenses/LICENSE-2.0 |
|
8 | // |
|
9 | // Unless required by applicable law or agreed to in writing, software |
|
10 | // distributed under the License is distributed on an "AS IS" BASIS, |
|
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
12 | // See the License for the specific language governing permissions and |
|
13 | // limitations under the License. |
|
14 | package org.apache.tapestry.asset; |
|
15 | ||
16 | import org.apache.hivemind.Resource; |
|
17 | import org.apache.tapestry.IAsset; |
|
18 | ||
19 | /** |
|
20 | * Responsible for determining if the path string of a {@link Resource} - |
|
21 | * typically involving {@link IAsset} resources being examined by the |
|
22 | * {@link AssetService} - match the configured resource match strings |
|
23 | * of this service. |
|
24 | * |
|
25 | * <p/>Currently used by {@link AssetService} to enable having unprotected |
|
26 | * resources based off of regexp patterns. |
|
27 | * |
|
28 | * @author jkuhnert |
|
29 | */ |
|
30 | public interface ResourceMatcher { |
|
31 | ||
32 | /** |
|
33 | * Checks for the existance of a resource pattern that matches the incoming |
|
34 | * path string. |
|
35 | * @param path The path to a resource |
|
36 | * @return True if the path is matched against one of the patterns configured |
|
37 | * for this matcher, false otherwise. |
|
38 | */ |
|
39 | ||
40 | boolean containsResource(String path); |
|
41 | } |