Package org.apache.camel.catalog
Class DefaultVersionManager
- java.lang.Object
-
- org.apache.camel.catalog.DefaultVersionManager
-
- All Implemented Interfaces:
VersionManager
public class DefaultVersionManager extends Object implements VersionManager
-
-
Constructor Summary
Constructors Constructor Description DefaultVersionManager(CamelCatalog camelCatalog)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLoadedVersion()
Gets the current loaded Camel version used by the catalog.InputStream
getResourceAsStream(String name)
Returns an input stream for reading the specified resource from the loaded Catalog version.String
getRuntimeProviderLoadedVersion()
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.
-
-
-
Constructor Detail
-
DefaultVersionManager
public DefaultVersionManager(CamelCatalog camelCatalog)
-
-
Method Detail
-
getLoadedVersion
public String getLoadedVersion()
Description copied from interface:VersionManager
Gets the current loaded Camel version used by the catalog.- Specified by:
getLoadedVersion
in interfaceVersionManager
-
loadVersion
public boolean loadVersion(String version)
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
public String getRuntimeProviderLoadedVersion()
Description copied from interface:VersionManager
Gets the current loaded runtime provider version used by the catalog.- Specified by:
getRuntimeProviderLoadedVersion
in interfaceVersionManager
-
loadRuntimeProviderVersion
public boolean loadRuntimeProviderVersion(String groupId, String artifactId, String version)
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
public InputStream getResourceAsStream(String name)
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.
-
-