Class DefaultCamelCatalog

  • All Implemented Interfaces:
    CamelCatalog

    public class DefaultCamelCatalog
    extends org.apache.camel.catalog.impl.AbstractCamelCatalog
    implements CamelCatalog
    Default CamelCatalog.
    • Constructor Detail

      • DefaultCamelCatalog

        public DefaultCamelCatalog()
        Creates the CamelCatalog without caching enabled.
      • DefaultCamelCatalog

        public DefaultCamelCatalog​(boolean caching)
        Creates the CamelCatalog
        Parameters:
        caching - whether to use cache
    • Method Detail

      • enableCache

        public void enableCache()
        Description copied from interface: CamelCatalog
        Enables caching of the resources which makes the catalog faster, but keeps data in memory during caching.

        The catalog does not cache by default.

        Specified by:
        enableCache in interface CamelCatalog
      • isCaching

        public boolean isCaching()
        Description copied from interface: CamelCatalog
        Whether caching has been enabled.
        Specified by:
        isCaching in interface CamelCatalog
      • addComponent

        public void addComponent​(String name,
                                 String className)
        Description copied from interface: CamelCatalog
        Adds a 3rd party component to this catalog.
        Specified by:
        addComponent in interface CamelCatalog
        Parameters:
        name - the component name
        className - the fully qualified class name for the component class
      • addComponent

        public void addComponent​(String name,
                                 String className,
                                 String jsonSchema)
        Description copied from interface: CamelCatalog
        Adds a 3rd party component to this catalog.
        Specified by:
        addComponent in interface CamelCatalog
        Parameters:
        name - the component name
        className - the fully qualified class name for the component class
        jsonSchema - the component JSON schema
      • addDataFormat

        public void addDataFormat​(String name,
                                  String className)
        Description copied from interface: CamelCatalog
        Adds a 3rd party data format to this catalog.
        Specified by:
        addDataFormat in interface CamelCatalog
        Parameters:
        name - the data format name
        className - the fully qualified class name for the data format class
      • addDataFormat

        public void addDataFormat​(String name,
                                  String className,
                                  String jsonSchema)
        Description copied from interface: CamelCatalog
        Adds a 3rd party data format to this catalog.
        Specified by:
        addDataFormat in interface CamelCatalog
        Parameters:
        name - the data format name
        className - the fully qualified class name for the data format class
        jsonSchema - the data format JSON schema
      • loadVersion

        public boolean loadVersion​(String version)
        Description copied from interface: CamelCatalog
        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.

        When loading a new version the cache will be invalidated.

        Important: When loading a new runtime provider version, then its strongly advised to load the same/corresponding version first using CamelCatalog.loadVersion(String).

        Specified by:
        loadVersion in interface CamelCatalog
        Parameters:
        version - the Camel version such as 2.17.1
        Returns:
        true if the version was loaded, false if not.
      • loadRuntimeProviderVersion

        public boolean loadRuntimeProviderVersion​(String groupId,
                                                  String artifactId,
                                                  String version)
        Description copied from interface: CamelCatalog
        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.

        Important: When loading a new runtime provider version, then its strongly advised to load the same/corresponding version first using CamelCatalog.loadVersion(String).

        Specified by:
        loadRuntimeProviderVersion in interface CamelCatalog
        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.
      • modelJSonSchema

        public String modelJSonSchema​(String name)
        Description copied from interface: CamelCatalog
        Returns the model information as JSON format.
        Specified by:
        modelJSonSchema in interface CamelCatalog
        Overrides:
        modelJSonSchema in class org.apache.camel.catalog.impl.AbstractCamelCatalog
        Parameters:
        name - the model name
        Returns:
        model details in JSon
      • eipModel

        public org.apache.camel.tooling.model.EipModel eipModel​(String name)
        Specified by:
        eipModel in interface CamelCatalog
        Overrides:
        eipModel in class org.apache.camel.catalog.impl.AbstractCamelCatalog
        Parameters:
        name - the EIP model name to look up
        Returns:
        the requested EIP model or null in case it is not available in this CamelCatalog
      • componentJSonSchema

        public String componentJSonSchema​(String name)
        Description copied from interface: CamelCatalog
        Returns the component information as JSON format.
        Specified by:
        componentJSonSchema in interface CamelCatalog
        Overrides:
        componentJSonSchema in class org.apache.camel.catalog.impl.AbstractCamelCatalog
        Parameters:
        name - the component name
        Returns:
        component details in JSon
      • componentModel

        public org.apache.camel.tooling.model.ComponentModel componentModel​(String name)
        Specified by:
        componentModel in interface CamelCatalog
        Overrides:
        componentModel in class org.apache.camel.catalog.impl.AbstractCamelCatalog
        Parameters:
        name - the component name to look up
        Returns:
        the requested component or null in case it is not available in this CamelCatalog
      • dataFormatJSonSchema

        public String dataFormatJSonSchema​(String name)
        Description copied from interface: CamelCatalog
        Returns the data format information as JSON format.
        Specified by:
        dataFormatJSonSchema in interface CamelCatalog
        Overrides:
        dataFormatJSonSchema in class org.apache.camel.catalog.impl.AbstractCamelCatalog
        Parameters:
        name - the data format name
        Returns:
        data format details in JSon
      • dataFormatModel

        public org.apache.camel.tooling.model.DataFormatModel dataFormatModel​(String name)
        Specified by:
        dataFormatModel in interface CamelCatalog
        Overrides:
        dataFormatModel in class org.apache.camel.catalog.impl.AbstractCamelCatalog
        Parameters:
        name - the data format name to look up
        Returns:
        the requested data format or null in case it is not available in this CamelCatalog
      • languageJSonSchema

        public String languageJSonSchema​(String name)
        Description copied from interface: CamelCatalog
        Returns the language information as JSON format.
        Specified by:
        languageJSonSchema in interface CamelCatalog
        Overrides:
        languageJSonSchema in class org.apache.camel.catalog.impl.AbstractCamelCatalog
        Parameters:
        name - the language name
        Returns:
        language details in JSon
      • languageModel

        public org.apache.camel.tooling.model.LanguageModel languageModel​(String name)
        Specified by:
        languageModel in interface CamelCatalog
        Overrides:
        languageModel in class org.apache.camel.catalog.impl.AbstractCamelCatalog
        Parameters:
        name - the language name to look up
        Returns:
        the requested language or null in case it is not available in this CamelCatalog
      • otherJSonSchema

        public String otherJSonSchema​(String name)
        Description copied from interface: CamelCatalog
        Returns the other (miscellaneous) information as JSON format.
        Specified by:
        otherJSonSchema in interface CamelCatalog
        Overrides:
        otherJSonSchema in class org.apache.camel.catalog.impl.AbstractCamelCatalog
        Parameters:
        name - the other (miscellaneous) name
        Returns:
        other (miscellaneous) details in JSon
      • otherModel

        public org.apache.camel.tooling.model.OtherModel otherModel​(String name)
        Specified by:
        otherModel in interface CamelCatalog
        Overrides:
        otherModel in class org.apache.camel.catalog.impl.AbstractCamelCatalog
        Parameters:
        name - the other name to look up
        Returns:
        the requested other or null in case it is not available in this CamelCatalog
      • mainJSonSchema

        public String mainJSonSchema()
        Overrides:
        mainJSonSchema in class org.apache.camel.catalog.impl.AbstractCamelCatalog
      • mainModel

        public org.apache.camel.tooling.model.MainModel mainModel()
        Specified by:
        mainModel in interface CamelCatalog
        Overrides:
        mainModel in class org.apache.camel.catalog.impl.AbstractCamelCatalog
        Returns:
        the requested main model or null in case it is not available in this CamelCatalog
      • componentAsciiDoc

        public String componentAsciiDoc​(String name)
        Description copied from interface: CamelCatalog
        Returns the component documentation as Ascii doc format.
        Specified by:
        componentAsciiDoc in interface CamelCatalog
        Parameters:
        name - the component name
        Returns:
        component documentation in ascii doc format.
      • componentHtmlDoc

        public String componentHtmlDoc​(String name)
        Description copied from interface: CamelCatalog
        Returns the component documentation as HTML format.
        Specified by:
        componentHtmlDoc in interface CamelCatalog
        Parameters:
        name - the component name
        Returns:
        component documentation in html format.
      • dataFormatAsciiDoc

        public String dataFormatAsciiDoc​(String dataformatName)
        Description copied from interface: CamelCatalog
        Returns the data format documentation as Ascii doc format.
        Specified by:
        dataFormatAsciiDoc in interface CamelCatalog
        Parameters:
        dataformatName - the data format name
        Returns:
        data format documentation in ascii doc format.
      • dataFormatHtmlDoc

        public String dataFormatHtmlDoc​(String dataformatName)
        Description copied from interface: CamelCatalog
        Returns the data format documentation as HTML format.
        Specified by:
        dataFormatHtmlDoc in interface CamelCatalog
        Parameters:
        dataformatName - the data format name
        Returns:
        data format documentation in HTML format.
      • languageAsciiDoc

        public String languageAsciiDoc​(String name)
        Description copied from interface: CamelCatalog
        Returns the language documentation as Ascii doc format.
        Specified by:
        languageAsciiDoc in interface CamelCatalog
        Parameters:
        name - the language name
        Returns:
        language documentation in ascii doc format.
      • languageHtmlDoc

        public String languageHtmlDoc​(String name)
        Description copied from interface: CamelCatalog
        Returns the language documentation as HTML format.
        Specified by:
        languageHtmlDoc in interface CamelCatalog
        Parameters:
        name - the language name
        Returns:
        language documentation in HTML format.
      • otherAsciiDoc

        public String otherAsciiDoc​(String name)
        Description copied from interface: CamelCatalog
        Returns the other (miscellaneous) documentation as Ascii doc format.
        Specified by:
        otherAsciiDoc in interface CamelCatalog
        Parameters:
        name - the other (miscellaneous) name
        Returns:
        other (miscellaneous) documentation in ascii doc format.
      • otherHtmlDoc

        public String otherHtmlDoc​(String name)
        Description copied from interface: CamelCatalog
        Returns the other (miscellaneous) documentation as HTML format.
        Specified by:
        otherHtmlDoc in interface CamelCatalog
        Parameters:
        name - the other (miscellaneous) name
        Returns:
        other (miscellaneous) documentation in HTML format.
      • findModelLabels

        public Set<String> findModelLabels()
        Description copied from interface: CamelCatalog
        Find all the unique label names all the models are using.
        Specified by:
        findModelLabels in interface CamelCatalog
        Returns:
        a set of all the labels.
      • findComponentLabels

        public Set<String> findComponentLabels()
        Description copied from interface: CamelCatalog
        Find all the unique label names all the components are using.
        Specified by:
        findComponentLabels in interface CamelCatalog
        Returns:
        a set of all the labels.
      • findDataFormatLabels

        public Set<String> findDataFormatLabels()
        Description copied from interface: CamelCatalog
        Find all the unique label names all the data formats are using.
        Specified by:
        findDataFormatLabels in interface CamelCatalog
        Returns:
        a set of all the labels.
      • findLanguageLabels

        public Set<String> findLanguageLabels()
        Description copied from interface: CamelCatalog
        Find all the unique label names all the languages are using.
        Specified by:
        findLanguageLabels in interface CamelCatalog
        Returns:
        a set of all the labels.
      • findOtherLabels

        public Set<String> findOtherLabels()
        Description copied from interface: CamelCatalog
        Find all the unique label names all the other (miscellaneous) are using.
        Specified by:
        findOtherLabels in interface CamelCatalog
        Returns:
        a set of all the labels.
      • archetypeCatalogAsXml

        public String archetypeCatalogAsXml()
        Description copied from interface: CamelCatalog
        Returns the Apache Camel Maven Archetype catalog in XML format.
        Specified by:
        archetypeCatalogAsXml in interface CamelCatalog
        Returns:
        the catalog in XML
      • mainJsonSchema

        public String mainJsonSchema()
        Description copied from interface: CamelCatalog
        Returns the camel-main json schema
        Specified by:
        mainJsonSchema in interface CamelCatalog
        Returns:
        the camel-main json schema