Package org.apache.camel.catalog
Interface VersionManager
- All Known Implementing Classes:
DefaultVersionManager
public interface VersionManager
Strategy to manage and load Camel versions the catalog uses.
-
Method Summary
Modifier and TypeMethodDescriptionGets the class loader that is able to load classes and resources from the catalog.Gets the current loaded Camel version used by the catalog.getResourceAsStream(String name) Returns an input stream for reading the specified resource from the loaded Catalog version.Gets the current loaded runtime provider version used by the catalog.booleanloadRuntimeProviderVersion(String groupId, String artifactId, String version) Attempt to load the runtime provider version to be used by the catalog.booleanloadVersion(String version) Attempt to load the Camel version to be used by the catalog.voidsetClassLoader(ClassLoader classLoader) Sets an extra class loader to use first for loading resources.
-
Method Details
-
setClassLoader
Sets an extra class loader to use first for loading resources. -
getClassLoader
ClassLoader getClassLoader()Gets the class loader that is able to load classes and resources from the catalog. -
getLoadedVersion
String getLoadedVersion()Gets the current loaded Camel version used by the catalog. -
loadVersion
Attempt to load the Camel version to be used by the catalog. Loading the camel-catalog JAR of the given version of choice may require internet access to download the JAR from Maven central. You can pre download the JAR and install in a local Maven repository to avoid internet access for offline environments.- Parameters:
version- the Camel version such as 2.17.1- Returns:
- true if the version was loaded, false if not.
-
getRuntimeProviderLoadedVersion
String getRuntimeProviderLoadedVersion()Gets the current loaded runtime provider version used by the catalog. -
loadRuntimeProviderVersion
Attempt to load the runtime provider version to be used by the catalog. Loading the runtime provider JAR of the given version of choice may require internet access to download the JAR from Maven central. You can pre download the JAR and install in a local Maven repository to avoid internet access for offline environments.- Parameters:
groupId- the runtime provider Maven groupIdartifactId- the runtime provider Maven artifactIdversion- the runtime provider Maven version- Returns:
- true if the version was loaded, false if not.
-
getResourceAsStream
Returns an input stream for reading the specified resource from the loaded Catalog version.- Parameters:
name- the resource name- Returns:
- the stream if found, or null if not found.
-