Class FileResolverRESTClient
- java.lang.Object
-
- dk.netarkivet.common.utils.service.FileResolverRESTClient
-
- All Implemented Interfaces:
FileResolver
public class FileResolverRESTClient extends java.lang.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 java.nio.file.Path
getPath(java.lang.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.java.util.List<java.nio.file.Path>
getPaths(java.util.regex.Pattern filepattern)
Return a list of file-paths matching a given pattern.
-
-
-
Constructor Detail
-
FileResolverRESTClient
public FileResolverRESTClient()
-
-
Method Detail
-
getPaths
public java.util.List<java.nio.file.Path> getPaths(java.util.regex.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 java.nio.file.Path getPath(java.lang.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
-
-