Class DefaultVersionManager

java.lang.Object
org.apache.camel.catalog.DefaultVersionManager
All Implemented Interfaces:
VersionManager

public class DefaultVersionManager extends Object implements VersionManager
  • Constructor Details

    • DefaultVersionManager

      public DefaultVersionManager(CamelCatalog camelCatalog)
  • Method Details

    • setClassLoader

      public void setClassLoader(ClassLoader classLoader)
      Description copied from interface: VersionManager
      Sets an extra class loader to use first for loading resources.
      Specified by:
      setClassLoader in interface VersionManager
    • getClassLoader

      public ClassLoader 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 interface VersionManager
    • getLoadedVersion

      public String getLoadedVersion()
      Description copied from interface: VersionManager
      Gets the current loaded Camel version used by the catalog.
      Specified by:
      getLoadedVersion in interface VersionManager
    • 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 interface VersionManager
      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 interface VersionManager
    • 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 interface VersionManager
      Parameters:
      groupId - the runtime provider Maven groupId
      artifactId - the runtime provider Maven artifactId
      version - 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 interface VersionManager
      Parameters:
      name - the resource name
      Returns:
      the stream if found, or null if not found.