Package org.apache.camel.catalog
Class DefaultCamelCatalog
java.lang.Object
org.apache.camel.catalog.impl.AbstractCamelCatalog
org.apache.camel.catalog.DefaultCamelCatalog
- All Implemented Interfaces:
CamelCatalog
public class DefaultCamelCatalog
extends org.apache.camel.catalog.impl.AbstractCamelCatalog
implements CamelCatalog
Default
CamelCatalog
.-
Constructor Summary
ConstructorDescriptionCreates theCamelCatalog
without caching enabled.DefaultCamelCatalog
(boolean caching) Creates theCamelCatalog
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addComponent
(String name, String className) Adds a 3rd party component to this catalog.void
addComponent
(String name, String className, String jsonSchema) Adds a 3rd party component to this catalog.void
addDataFormat
(String name, String className) Adds a 3rd party data format to this catalog.void
addDataFormat
(String name, String className, String jsonSchema) Adds a 3rd party data format to this catalog.List<org.apache.camel.tooling.model.ReleaseModel>
Load all Camel Quarkus releases from catalogList<org.apache.camel.tooling.model.ReleaseModel>
Load all Camel releases (core and spring-boot) from catalogcomponentJSonSchema
(String name) Returns the component information as JSON format.org.apache.camel.tooling.model.ComponentModel
componentModel
(String name) dataFormatJSonSchema
(String name) Returns the data format information as JSON format.org.apache.camel.tooling.model.DataFormatModel
dataFormatModel
(String name) org.apache.camel.tooling.model.EipModel
void
Enables caching of the resources which makes the catalog faster, but keeps data in memory during caching.Find all the unique label names all the components are using.Find all the component names from the Camel catalogfindComponentNames
(String filter) Find all the component names from the Camel catalog that matches the labelFind all the unique label names all the data formats are using.Find all the data format names from the Camel catalogfindDataFormatNames
(String filter) Find all the data format names from the Camel catalog that matches the labelFind all the unique label names all the languages are using.Find all the language names from the Camel catalogfindLanguageNames
(String filter) Find all the language names from the Camel catalog that matches the labelFind all the unique label names all the models are using.Find all the model names from the Camel catalogfindModelNames
(String filter) Find all the model names from the Camel catalog that matches the labelFind all the unique label names all the other (miscellaneous) are using.Find all the other (miscellaneous) names from the Camel catalogfindOtherNames
(String filter) Find all the other (miscellaneous) names from the Camel catalog that matches the labelThe version of this Camel CatalogGets the current loaded Camel version used by the catalog.Gets theRuntimeProvider
in use.Gets the current loaded runtime provider version used by the catalog.Gets theVersionManager
in useboolean
Whether caching has been enabled.languageJSonSchema
(String name) Returns the language information as JSON format.org.apache.camel.tooling.model.LanguageModel
languageModel
(String name) Lists all the components summary details in JSonLists all the data formats summary details in JSonLists all the languages summary details in JSonLists all the models (EIPs) summary details in JSonLists all the others (miscellaneous) summary details in JSonloadResource
(String kind, String name) Load resource from catalog classpathboolean
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.Returns the camel-main json schemaorg.apache.camel.tooling.model.MainModel
org.apache.camel.tooling.model.ArtifactModel<?>
modelFromMavenGAV
(String groupId, String artifactId, String version) Lookup the model for the given Maven GAVmodelJSonSchema
(String name) Returns the model information as JSON format.otherJSonSchema
(String name) Returns the other (miscellaneous) information as JSON format.org.apache.camel.tooling.model.OtherModel
otherModel
(String name) void
setRuntimeProvider
(RuntimeProvider runtimeProvider) To plugin a customRuntimeProvider
that amends the catalog to only include information that is supported on the runtime.void
setVersionManager
(VersionManager versionManager) To plugin a customVersionManager
to load other versions of Camel the catalog should use.Returns the Camel Spring XML schemaReports a summary what the catalog contains in JSonMethods inherited from class org.apache.camel.catalog.impl.AbstractCamelCatalog
asEndpointUri, asEndpointUriXml, endpointComponentName, endpointLenientProperties, endpointProperties, getJSonSchemaResolver, getSuggestionStrategy, setJSonSchemaResolver, setSuggestionStrategy, validateConfigurationProperty, validateEndpointProperties, validateEndpointProperties, validateEndpointProperties, validateLanguageExpression, validateLanguagePredicate, validateProperties, validateTimePattern
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.catalog.CamelCatalog
asEndpointUri, asEndpointUriXml, endpointComponentName, endpointLenientProperties, endpointProperties, findNames, getJSonSchemaResolver, getSuggestionStrategy, model, setJSonSchemaResolver, setSuggestionStrategy, validateConfigurationProperty, validateEndpointProperties, validateEndpointProperties, validateEndpointProperties, validateLanguageExpression, validateLanguagePredicate, validateTimePattern
-
Constructor Details
-
DefaultCamelCatalog
public DefaultCamelCatalog()Creates theCamelCatalog
without caching enabled. -
DefaultCamelCatalog
public DefaultCamelCatalog(boolean caching) Creates theCamelCatalog
- Parameters:
caching
- whether to use cache
-
-
Method Details
-
getRuntimeProvider
Description copied from interface:CamelCatalog
Gets theRuntimeProvider
in use.- Specified by:
getRuntimeProvider
in interfaceCamelCatalog
-
setRuntimeProvider
Description copied from interface:CamelCatalog
To plugin a customRuntimeProvider
that amends the catalog to only include information that is supported on the runtime.- Specified by:
setRuntimeProvider
in interfaceCamelCatalog
-
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 interfaceCamelCatalog
-
isCaching
public boolean isCaching()Description copied from interface:CamelCatalog
Whether caching has been enabled.- Specified by:
isCaching
in interfaceCamelCatalog
-
setVersionManager
Description copied from interface:CamelCatalog
To plugin a customVersionManager
to load other versions of Camel the catalog should use.- Specified by:
setVersionManager
in interfaceCamelCatalog
-
getVersionManager
Description copied from interface:CamelCatalog
Gets theVersionManager
in use- Specified by:
getVersionManager
in interfaceCamelCatalog
-
addComponent
Description copied from interface:CamelCatalog
Adds a 3rd party component to this catalog.- Specified by:
addComponent
in interfaceCamelCatalog
- Parameters:
name
- the component nameclassName
- the fully qualified class name for the component class
-
addComponent
Description copied from interface:CamelCatalog
Adds a 3rd party component to this catalog.- Specified by:
addComponent
in interfaceCamelCatalog
- Parameters:
name
- the component nameclassName
- the fully qualified class name for the component classjsonSchema
- the component JSON schema
-
addDataFormat
Description copied from interface:CamelCatalog
Adds a 3rd party data format to this catalog.- Specified by:
addDataFormat
in interfaceCamelCatalog
- Parameters:
name
- the data format nameclassName
- the fully qualified class name for the data format class
-
addDataFormat
Description copied from interface:CamelCatalog
Adds a 3rd party data format to this catalog.- Specified by:
addDataFormat
in interfaceCamelCatalog
- Parameters:
name
- the data format nameclassName
- the fully qualified class name for the data format classjsonSchema
- the data format JSON schema
-
getCatalogVersion
Description copied from interface:CamelCatalog
The version of this Camel Catalog- Specified by:
getCatalogVersion
in interfaceCamelCatalog
-
loadVersion
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 usingCamelCatalog.loadVersion(String)
.- Specified by:
loadVersion
in interfaceCamelCatalog
- Parameters:
version
- the Camel version such as 2.17.1- Returns:
- true if the version was loaded, false if not.
-
getLoadedVersion
Description copied from interface:CamelCatalog
Gets the current loaded Camel version used by the catalog.- Specified by:
getLoadedVersion
in interfaceCamelCatalog
-
getRuntimeProviderLoadedVersion
Description copied from interface:CamelCatalog
Gets the current loaded runtime provider version used by the catalog.- Specified by:
getRuntimeProviderLoadedVersion
in interfaceCamelCatalog
-
loadRuntimeProviderVersion
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 usingCamelCatalog.loadVersion(String)
.- Specified by:
loadRuntimeProviderVersion
in interfaceCamelCatalog
- 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.
-
findComponentNames
Description copied from interface:CamelCatalog
Find all the component names from the Camel catalog- Specified by:
findComponentNames
in interfaceCamelCatalog
-
findDataFormatNames
Description copied from interface:CamelCatalog
Find all the data format names from the Camel catalog- Specified by:
findDataFormatNames
in interfaceCamelCatalog
-
findLanguageNames
Description copied from interface:CamelCatalog
Find all the language names from the Camel catalog- Specified by:
findLanguageNames
in interfaceCamelCatalog
-
findModelNames
Description copied from interface:CamelCatalog
Find all the model names from the Camel catalog- Specified by:
findModelNames
in interfaceCamelCatalog
-
findOtherNames
Description copied from interface:CamelCatalog
Find all the other (miscellaneous) names from the Camel catalog- Specified by:
findOtherNames
in interfaceCamelCatalog
-
findModelNames
Description copied from interface:CamelCatalog
Find all the model names from the Camel catalog that matches the label- Specified by:
findModelNames
in interfaceCamelCatalog
-
findComponentNames
Description copied from interface:CamelCatalog
Find all the component names from the Camel catalog that matches the label- Specified by:
findComponentNames
in interfaceCamelCatalog
-
findDataFormatNames
Description copied from interface:CamelCatalog
Find all the data format names from the Camel catalog that matches the label- Specified by:
findDataFormatNames
in interfaceCamelCatalog
-
findLanguageNames
Description copied from interface:CamelCatalog
Find all the language names from the Camel catalog that matches the label- Specified by:
findLanguageNames
in interfaceCamelCatalog
-
findOtherNames
Description copied from interface:CamelCatalog
Find all the other (miscellaneous) names from the Camel catalog that matches the label- Specified by:
findOtherNames
in interfaceCamelCatalog
-
modelJSonSchema
Description copied from interface:CamelCatalog
Returns the model information as JSON format.- Specified by:
modelJSonSchema
in interfaceCamelCatalog
- Overrides:
modelJSonSchema
in classorg.apache.camel.catalog.impl.AbstractCamelCatalog
- Parameters:
name
- the model name- Returns:
- model details in JSon
-
eipModel
- Specified by:
eipModel
in interfaceCamelCatalog
- Overrides:
eipModel
in classorg.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 thisCamelCatalog
-
componentJSonSchema
Description copied from interface:CamelCatalog
Returns the component information as JSON format.- Specified by:
componentJSonSchema
in interfaceCamelCatalog
- Overrides:
componentJSonSchema
in classorg.apache.camel.catalog.impl.AbstractCamelCatalog
- Parameters:
name
- the component name- Returns:
- component details in JSon
-
componentModel
- Specified by:
componentModel
in interfaceCamelCatalog
- Overrides:
componentModel
in classorg.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 thisCamelCatalog
-
dataFormatJSonSchema
Description copied from interface:CamelCatalog
Returns the data format information as JSON format.- Specified by:
dataFormatJSonSchema
in interfaceCamelCatalog
- Overrides:
dataFormatJSonSchema
in classorg.apache.camel.catalog.impl.AbstractCamelCatalog
- Parameters:
name
- the data format name- Returns:
- data format details in JSon
-
dataFormatModel
- Specified by:
dataFormatModel
in interfaceCamelCatalog
- Overrides:
dataFormatModel
in classorg.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 thisCamelCatalog
-
languageJSonSchema
Description copied from interface:CamelCatalog
Returns the language information as JSON format.- Specified by:
languageJSonSchema
in interfaceCamelCatalog
- Overrides:
languageJSonSchema
in classorg.apache.camel.catalog.impl.AbstractCamelCatalog
- Parameters:
name
- the language name- Returns:
- language details in JSon
-
languageModel
- Specified by:
languageModel
in interfaceCamelCatalog
- Overrides:
languageModel
in classorg.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 thisCamelCatalog
-
otherJSonSchema
Description copied from interface:CamelCatalog
Returns the other (miscellaneous) information as JSON format.- Specified by:
otherJSonSchema
in interfaceCamelCatalog
- Overrides:
otherJSonSchema
in classorg.apache.camel.catalog.impl.AbstractCamelCatalog
- Parameters:
name
- the other (miscellaneous) name- Returns:
- other (miscellaneous) details in JSon
-
otherModel
- Specified by:
otherModel
in interfaceCamelCatalog
- Overrides:
otherModel
in classorg.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 thisCamelCatalog
-
mainJSonSchema
- Overrides:
mainJSonSchema
in classorg.apache.camel.catalog.impl.AbstractCamelCatalog
-
mainModel
public org.apache.camel.tooling.model.MainModel mainModel()- Specified by:
mainModel
in interfaceCamelCatalog
- Overrides:
mainModel
in classorg.apache.camel.catalog.impl.AbstractCamelCatalog
- Returns:
- the requested main model or
null
in case it is not available in thisCamelCatalog
-
findModelLabels
Description copied from interface:CamelCatalog
Find all the unique label names all the models are using.- Specified by:
findModelLabels
in interfaceCamelCatalog
- Returns:
- a set of all the labels.
-
findComponentLabels
Description copied from interface:CamelCatalog
Find all the unique label names all the components are using.- Specified by:
findComponentLabels
in interfaceCamelCatalog
- Returns:
- a set of all the labels.
-
findDataFormatLabels
Description copied from interface:CamelCatalog
Find all the unique label names all the data formats are using.- Specified by:
findDataFormatLabels
in interfaceCamelCatalog
- Returns:
- a set of all the labels.
-
findLanguageLabels
Description copied from interface:CamelCatalog
Find all the unique label names all the languages are using.- Specified by:
findLanguageLabels
in interfaceCamelCatalog
- Returns:
- a set of all the labels.
-
findOtherLabels
Description copied from interface:CamelCatalog
Find all the unique label names all the other (miscellaneous) are using.- Specified by:
findOtherLabels
in interfaceCamelCatalog
- Returns:
- a set of all the labels.
-
springSchemaAsXml
Description copied from interface:CamelCatalog
Returns the Camel Spring XML schema- Specified by:
springSchemaAsXml
in interfaceCamelCatalog
- Returns:
- the spring XML schema
-
mainJsonSchema
Description copied from interface:CamelCatalog
Returns the camel-main json schema- Specified by:
mainJsonSchema
in interfaceCamelCatalog
- Returns:
- the camel-main json schema
-
listComponentsAsJson
Description copied from interface:CamelCatalog
Lists all the components summary details in JSon- Specified by:
listComponentsAsJson
in interfaceCamelCatalog
-
listDataFormatsAsJson
Description copied from interface:CamelCatalog
Lists all the data formats summary details in JSon- Specified by:
listDataFormatsAsJson
in interfaceCamelCatalog
-
listLanguagesAsJson
Description copied from interface:CamelCatalog
Lists all the languages summary details in JSon- Specified by:
listLanguagesAsJson
in interfaceCamelCatalog
-
listModelsAsJson
Description copied from interface:CamelCatalog
Lists all the models (EIPs) summary details in JSon- Specified by:
listModelsAsJson
in interfaceCamelCatalog
-
listOthersAsJson
Description copied from interface:CamelCatalog
Lists all the others (miscellaneous) summary details in JSon- Specified by:
listOthersAsJson
in interfaceCamelCatalog
-
summaryAsJson
Description copied from interface:CamelCatalog
Reports a summary what the catalog contains in JSon- Specified by:
summaryAsJson
in interfaceCamelCatalog
-
modelFromMavenGAV
public org.apache.camel.tooling.model.ArtifactModel<?> modelFromMavenGAV(String groupId, String artifactId, String version) Description copied from interface:CamelCatalog
Lookup the model for the given Maven GAV- Specified by:
modelFromMavenGAV
in interfaceCamelCatalog
- Parameters:
groupId
- maven group idartifactId
- maven artifact idversion
- maven version (optional)- Returns:
- the requested model or
null
in case it is not available in thisCamelCatalog
-
loadResource
Description copied from interface:CamelCatalog
Load resource from catalog classpath- Specified by:
loadResource
in interfaceCamelCatalog
- Parameters:
kind
- The resource kind, ex. camel-jbangname
- The resource name- Returns:
- An input stream for reading the resource; null if the resource could not be found
-
camelReleases
Description copied from interface:CamelCatalog
Load all Camel releases (core and spring-boot) from catalog- Specified by:
camelReleases
in interfaceCamelCatalog
-
camelQuarkusReleases
Description copied from interface:CamelCatalog
Load all Camel Quarkus releases from catalog- Specified by:
camelQuarkusReleases
in interfaceCamelCatalog
-