Package de.xima.fc.security.access
Class ListedResourceAccessControl
java.lang.Object
de.xima.fc.security.access.ListedResourceAccessControl
- All Implemented Interfaces:
IResourceAccessControl
@Immutable
@ThreadSafe
public final class ListedResourceAccessControl
extends Object
implements IResourceAccessControl
Implements
IResourceAccessControl
with a blacklist and whitelist. When the resource matches any entry in the
blacklist, access to the resource is forbidden (irrespective of the whitelist). Otherwise, when no blacklist entry
matches, access to the resource is allowed when it matches at least one of the whitelist entries, and forbidden
otherwise.- Since:
- 7.0.10
- Author:
- XIMA MEDIA GmbH
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Simple builder for configuring aListedResourceAccessControl
instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isAccessAllowed
(URI uri) Checks whether the given URI may be accessed or whether access is forbidden.boolean
isAccessAllowed
(URL url) Checks whether the given URL may be accessed or whether access is forbidden.
-
Method Details
-
isAccessAllowed
Description copied from interface:IResourceAccessControl
Checks whether the given URI may be accessed or whether access is forbidden.- Specified by:
isAccessAllowed
in interfaceIResourceAccessControl
- Parameters:
uri
- URI to check.- Returns:
true
when the URI may be accessed,false
otherwise.- Throws:
ResourceAccessCheckException
- When the URI could not be checked. The exact behavior when an exception is thrown depends on the logic that uses this interface.
-
isAccessAllowed
Description copied from interface:IResourceAccessControl
Checks whether the given URL may be accessed or whether access is forbidden.- Specified by:
isAccessAllowed
in interfaceIResourceAccessControl
- Parameters:
url
- URL to check.- Returns:
true
when the URL may be accessed,false
otherwise.- Throws:
ResourceAccessCheckException
- When the URL could not be checked. The exact behavior when an exception is thrown depends on the logic that uses this interface.
-