Package org.apache.camel.catalog
Class DefaultVersionManager
java.lang.Object
org.apache.camel.catalog.DefaultVersionManager
- All Implemented Interfaces:
VersionManager
-
Constructor Summary
-
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.boolean
loadRuntimeProviderVersion
(String groupId, String artifactId, String version) Attempt to load the runtime provider version to be used by the catalog.boolean
loadVersion
(String version) Attempt to load the Camel version to be used by the catalog.void
setClassLoader
(ClassLoader classLoader) Sets an extra class loader to use first for loading resources.
-
Constructor Details
-
DefaultVersionManager
-
-
Method Details
-
setClassLoader
Description copied from interface:VersionManager
Sets an extra class loader to use first for loading resources.- Specified by:
setClassLoader
in interfaceVersionManager
-
getClassLoader
Description copied from interface:VersionManager
Gets the class loader that is able to load classes and resources from the catalog.- Specified by:
getClassLoader
in interfaceVersionManager
-
getLoadedVersion
Description copied from interface:VersionManager
Gets the current loaded Camel version used by the catalog.- Specified by:
getLoadedVersion
in interfaceVersionManager
-
loadVersion
Description copied from interface:VersionManager
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.- Specified by:
loadVersion
in interfaceVersionManager
- Parameters:
version
- the Camel version such as 2.17.1- Returns:
- true if the version was loaded, false if not.
-
getRuntimeProviderLoadedVersion
Description copied from interface:VersionManager
Gets the current loaded runtime provider version used by the catalog.- Specified by:
getRuntimeProviderLoadedVersion
in interfaceVersionManager
-
loadRuntimeProviderVersion
Description copied from interface:VersionManager
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.- Specified by:
loadRuntimeProviderVersion
in interfaceVersionManager
- 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
Description copied from interface:VersionManager
Returns an input stream for reading the specified resource from the loaded Catalog version.- Specified by:
getResourceAsStream
in interfaceVersionManager
- Parameters:
name
- the resource name- Returns:
- the stream if found, or null if not found.
-