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 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 UNRESTRICTED instead. An application which uses linked databases must configure either UNRESTRICTED or 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