Package de.xima.fc.security.access
Class ResourceMatchers
java.lang.Object
de.xima.fc.security.access.ResourceMatchers
Factory for common
IResourceMatcher
s. Each resource matcher must be thread-safe and immutable.- Since:
- 7.0.10
- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IResourceMatcher
always()
static IResourceMatcher
matchingScheme
(String scheme) Returns a resource matcher that matches a URI by its scheme or an URL by its protocol.static IResourceMatcher
never()
-
Constructor Details
-
ResourceMatchers
public ResourceMatchers()
-
-
Method Details
-
always
- Returns:
- A resource matcher that matches any URL or URI.
-
matchingScheme
Returns a resource matcher that matches a URI by its scheme or an URL by its protocol. The scheme must be identical, but the comparison is made case-insensitive since in practivefile://
is usually treated the same asFILE://
. Anull
resource never matches.- Parameters:
scheme
- Scheme to match.- Returns:
- A resource matcher that matches when the protocol of a URL or the scheme of a URI matches the given scheme exactly (case-insensitive).
-
never
- Returns:
- A resource matcher that never matches any URL or URI.
-