Interface LinkResolver
-
- All Known Implementing Classes:
CustomLinkResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface LinkResolver
Resolver for linked databases.- Author:
- James Ahlborn
- Usage:
- Intermediate: This class requires moderate API knowledge.
-
-
Field Summary
Fields Modifier and Type Field Description static LinkResolverDEFAULTLink resolver which refuses to open any linked database.static LinkResolverUNRESTRICTEDLink resolver which opens whatever file name the linking database specifies, including absolute, network (UNC) and device paths.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DatabaseresolveLinkedDatabase(Database linkerDb, String linkeeFileName)Returns the appropriate Database instance for the linkeeFileName from the given linkerDb.
-
-
-
Field Detail
-
UNRESTRICTED
static final LinkResolver UNRESTRICTED
Link resolver which opens whatever file name the linking database specifies, including absolute, network (UNC) and device paths.Since the linkee file name comes from the database file itself, a database from an untrusted source can use this resolver to make jackcess read an arbitrary local file or open a network connection. Only use this resolver when the linked database file names can be trusted.
- Usage:
- General: This field is general use.
-
DEFAULT
static final LinkResolver DEFAULT
Link resolver which refuses to open any linked database.This is the resolver used if none is provided. Enabling the "com.healthmarketscience.jackcess.allowLinkResolution" system property selects
UNRESTRICTEDinstead. An application which uses linked databases must configure eitherUNRESTRICTEDor a resolver which enforces its own policy for which file names are acceptable.- Usage:
- General: This field is general use.
-
-
Method Detail
-
resolveLinkedDatabase
Database resolveLinkedDatabase(Database linkerDb, String linkeeFileName) throws IOException
Returns the appropriate Database instance for the linkeeFileName from the given linkerDb.- Throws:
IOException
-
-