Package org.geotools.data.ows
Interface URLChecker
-
public interface URLCheckerChecks URIs/URLs/locations to confirm if they are allowed for use. Used to restrict access to remote servers, e.g. to prevent access to untrusted servers or local resources, as many OGC services either allow users to provide links to remote resources, or provide links that are not restricted to their original host.
Implementations should be registered using SPI inMETA-INF/services/org.geotools.data .ows.URLChecker.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanconfirm(String location)Used to confirm location is allowed for use.StringgetName()booleanisEnabled()
-
-
-
Method Detail
-
getName
String getName()
- Returns:
- URLChecker name that best describes its purpose (e.g. GML Schema evaluator etc)
-
isEnabled
boolean isEnabled()
- Returns:
- Boolean flag indicating if this URLChecker should be used
-
confirm
boolean confirm(String location)
Used to confirm location is allowed for use.URLChecker is used to confirm if a location is allowed for use, returning when they recognize a location as permitted. Several URLChecker instances are expected to be available, the location will be allowed if at least one URLChecker can confirm it is permitted for use.
Location is normalized to remove all redundant
.and..path names, and provide absolute file references using empty host namefile:///pathapproach.- Parameters:
location- Location expressed as normalized URL, URI or path.- Returns:
trueindicates the URLChecker can confirm the location is allowed for use,falseindicates the URLChecker is unable to confirm.
-
-