Class PluginDriver
java.lang.Object
de.julianweinelt.datacat.dbx.api.drivers.PluginDriver
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddVersion(String versionName) Registers a new version for this driver, giving just the name.
The version will therefore be registered as semantic version of typeVersionStatus.RELEASE.protected voidaddVersion(String versionName, boolean semantic) Registers a new version for this driver, giving just the name.
The version will therefore be registered as a version of typeVersionStatus.RELEASE.protected voidaddVersion(String versionName, boolean semantic, VersionStatus status) Registers a new version for this driver, giving just the name.@Nullable StringDefines which type of archive this driver is.abstract voidDefine every version available for this driver here.
You may useaddVersion(String)in this method to define versions.abstract CompletableFuture<Void>abstract StringdownloadURL(String version) Defines the url to download the driver jar from depending on the given version.booleanDefines if the downloaded driver files are usually compressed in e.g. zip or tar.abstract CompletableFuture<String>Gets the latest version of the driver by looking it up on the internet.toString()
-
Constructor Details
-
PluginDriver
-
-
Method Details
-
latestVersion
Gets the latest version of the driver by looking it up on the internet.- Returns:
- The latest version as
String, mostly in a semantic version
-
downloadURL
Defines the url to download the driver jar from depending on the given version.- Parameters:
version- The version String which will be used in the download- Returns:
- A
Stringcontaining the url to download the file from
-
isZippedFile
public boolean isZippedFile()Defines if the downloaded driver files are usually compressed in e.g. zip or tar.- Returns:
trueif the driver files are usually compressed, otherwisefalse- See Also:
-
archiveType
Defines which type of archive this driver is.- Returns:
- A
Stringcontaining the file extension of the compressed files,nullifisZippedFile()isfalse
-
defineVersions
public abstract void defineVersions()Define every version available for this driver here.
You may useaddVersion(String)in this method to define versions. -
defineVersionsASync
-
addVersion
Registers a new version for this driver, giving just the name.
The version will therefore be registered as semantic version of typeVersionStatus.RELEASE.- Parameters:
versionName- The name of the version as aString, e.g.1.4.2(semantic) or1.7.542.3-beta-1(non-semantic)- See Also:
-
addVersion
Registers a new version for this driver, giving just the name.
The version will therefore be registered as a version of typeVersionStatus.RELEASE.- Parameters:
versionName- The name of the version as aString, e.g.1.4.2(semantic) or1.7.542.3-beta-1(non-semantic)semantic- Defines if this is a semantic version- See Also:
-
addVersion
Registers a new version for this driver, giving just the name.- Parameters:
versionName- The name of the version as aString, e.g.1.4.2(semantic) or1.7.542.3-beta-1(non-semantic)semantic- Defines if this is a semantic versionstatus- The type of version, seeVersionStatusfor more.- See Also:
-
toString
-