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
ImplementsIResourceAccessControlwith 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 Classes Modifier and Type Class Description static classListedResourceAccessControl.ListedResourceAccessControlBuilderSimple builder for configuring aListedResourceAccessControlinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAccessAllowed(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 Detail
-
isAccessAllowed
public boolean isAccessAllowed(URI uri) throws ResourceAccessCheckException
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
public boolean isAccessAllowed(URL url) throws ResourceAccessCheckException
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.
-
-