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 classSimple builder for configuring aListedResourceAccessControlinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanisAccessAllowed(URI uri) Checks whether the given URI may be accessed or whether access is forbidden.booleanisAccessAllowed(URL url) Checks whether the given URL may be accessed or whether access is forbidden.
-
Method Details
-
isAccessAllowed
Description copied from interface:IResourceAccessControlChecks whether the given URI may be accessed or whether access is forbidden.- Specified by:
isAccessAllowedin interfaceIResourceAccessControl- Parameters:
uri- URI to check.- Returns:
truewhen the URI may be accessed,falseotherwise.- 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:IResourceAccessControlChecks whether the given URL may be accessed or whether access is forbidden.- Specified by:
isAccessAllowedin interfaceIResourceAccessControl- Parameters:
url- URL to check.- Returns:
truewhen the URL may be accessed,falseotherwise.- 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.
-