Class FileResolverRESTClient
- java.lang.Object
-
- dk.netarkivet.common.utils.service.FileResolverRESTClient
-
- All Implemented Interfaces:
FileResolver
public class FileResolverRESTClient extends Object implements FileResolver
A FileResolver client to communicate with a service implementing the FileResolver API e.g. url's like http://some.url.dk/555-.*
-
-
Constructor Summary
Constructors Constructor Description FileResolverRESTClient()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Path
getPath(String filename)
Note that the input to this method should be a literal filename but no checking or escaping is done to prevent the inclusion of regex directives.List<Path>
getPaths(Pattern filepattern)
Return a list of file-paths matching a given pattern.
-
-
-
Method Detail
-
getPaths
public List<Path> getPaths(Pattern filepattern)
Description copied from interface:FileResolver
Return a list of file-paths matching a given pattern. Empty if there are no matching files.- Specified by:
getPaths
in interfaceFileResolver
- Parameters:
filepattern
- String to match.- Returns:
- The list of matching file-paths.
-
getPath
public Path getPath(String filename)
Note that the input to this method should be a literal filename but no checking or escaping is done to prevent the inclusion of regex directives.- Specified by:
getPath
in interfaceFileResolver
- Parameters:
filename
- The filename to resolve.- Returns:
- The first Path to a matching file or null if no such file is found
-
-