Package com.install4j.jdk.spi
Interface JdkProvider
-
public interface JdkProvider
Entry point for the JDK provider. Add a text file namedMETA-INF/services/com.install4j.jdk.spi.JdkProvider
to the JAR file containing the JDK provider and put the name of the implementation class in it. If the JAR file is added to the class path of install4j, the JDK provider will be picked up automatically. The class path of install4j can be changed by adding the line
to the-classpath/a <path to JAR file>
bin/install4j.vmoptions
file.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.String
detectDirectoryLayoutPrefix(java.lang.String platform, java.lang.String release, java.io.File bundleFile)
Returns the common prefix directory for the directory layout of the JDK.JdkReleaseNode
getByConfigKey(java.lang.String configKey)
Find a release from a release config key.default java.lang.String
getDisplayName()
The display name for the provider.java.lang.String
getId()
A unique ID for the provider.JdkReleaseNode
getLatestByCategoryKey(java.lang.String categoryKey, java.lang.String platform)
Find the latest release from a category key that also has support for the given platform.java.util.List<java.lang.String>
getPlatformsByCategoryKey(java.lang.String categoryKey)
Get all platforms that are available from releases the category with the given category key.java.util.Collection<? extends JdkNode>
getReleases()
Returns all releases.default java.io.File
removeArchivePrefix(java.io.File relativeFile, java.lang.String release, java.lang.String platform)
Remove a common prefix directory from the relative paths inside a JDK bundle.
-
-
-
Method Detail
-
getId
@NotNull java.lang.String getId()
A unique ID for the provider.
-
getDisplayName
@NotNull default java.lang.String getDisplayName()
The display name for the provider. By default, this is the same as the ID.
-
getReleases
@NotNull java.util.Collection<? extends JdkNode> getReleases()
Returns all releases. This is a tree of category and release nodes that is displayed to the user.- See Also:
JdkReleaseNode
,JdkCategoryNode
-
getByConfigKey
@Nullable JdkReleaseNode getByConfigKey(@NotNull java.lang.String configKey)
Find a release from a release config key. The config key is returned byJdkReleaseNode.getConfigKey()
. Null if not found.
-
getLatestByCategoryKey
@Nullable JdkReleaseNode getLatestByCategoryKey(@NotNull java.lang.String categoryKey, @NotNull java.lang.String platform)
Find the latest release from a category key that also has support for the given platform. The category key is returned byJdkCategoryNode.getCategoryKey()
. Null if the category or no matching release could be found.
-
getPlatformsByCategoryKey
@Nullable java.util.List<java.lang.String> getPlatformsByCategoryKey(@NotNull java.lang.String categoryKey)
Get all platforms that are available from releases the category with the given category key. This is used for suggesting platforms for Linux/Unix media files. Null if the category could not be found.
-
removeArchivePrefix
@NotNull default java.io.File removeArchivePrefix(@NotNull java.io.File relativeFile, @NotNull java.lang.String release, @NotNull java.lang.String platform)
Remove a common prefix directory from the relative paths inside a JDK bundle. By default, nothing is removed.
-
detectDirectoryLayoutPrefix
@NotNull default java.lang.String detectDirectoryLayoutPrefix(@NotNull java.lang.String platform, @NotNull java.lang.String release, @NotNull java.io.File bundleFile)
Returns the common prefix directory for the directory layout of the JDK. By default this handles theContents/Home/
prefix for JDKs on macOS.
-
-